# Conflicts: # src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java # src/main/ui/static/analysis/risk_business.jsmaster
commit
05af52917c
@ -0,0 +1,480 @@
|
|||||||
|
package au.com.royalpay.payment.manage.appclient.beans;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
|
public class AppMerchantBean {
|
||||||
|
private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
private String textType;
|
||||||
|
private String searchText;
|
||||||
|
private String client_moniker;
|
||||||
|
private String state;
|
||||||
|
private String suburb;
|
||||||
|
private String short_name;
|
||||||
|
private String sub_merchant_id;
|
||||||
|
private String org_id;
|
||||||
|
private String org_ids;
|
||||||
|
private String bd;
|
||||||
|
private String business_structure;
|
||||||
|
private String industry;
|
||||||
|
private Integer clean_day;
|
||||||
|
private String bd_city;
|
||||||
|
private String surcharge_start_rate;
|
||||||
|
private String surcharge_end_rate;
|
||||||
|
private String create_start_time;
|
||||||
|
private String approve_start_time;
|
||||||
|
private String create_end_time;
|
||||||
|
private String approve_end_time;
|
||||||
|
private String transaction_start_time;
|
||||||
|
private String transaction_end_time;
|
||||||
|
private boolean approving = false;
|
||||||
|
private int page = 1;
|
||||||
|
private int limit = 10;
|
||||||
|
private boolean onlyMe = false;
|
||||||
|
private boolean tempMchId = false;
|
||||||
|
private boolean quickPass = false;
|
||||||
|
private boolean greenChannel = false;
|
||||||
|
private boolean greenChannelBdTodo = false;
|
||||||
|
private boolean pass = false;
|
||||||
|
private boolean completed_contract = false;
|
||||||
|
private boolean apply_to_back = false;
|
||||||
|
private boolean bd_upload_material = false;
|
||||||
|
private boolean is_valid = false;
|
||||||
|
private String merchant_id;
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
public String getClient_moniker() {
|
||||||
|
return StringUtils.isEmpty(client_moniker) ? null : client_moniker;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClient_moniker(String client_moniker) {
|
||||||
|
this.client_moniker = client_moniker;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShort_name() {
|
||||||
|
return short_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShort_name(String short_name) {
|
||||||
|
this.short_name = short_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSub_merchant_id() {
|
||||||
|
return sub_merchant_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSub_merchant_id(String sub_merchant_id) {
|
||||||
|
this.sub_merchant_id = sub_merchant_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPage() {
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPage(int page) {
|
||||||
|
this.page = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimit(int limit) {
|
||||||
|
this.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JSONObject toJsonParam() {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
if (StringUtils.isNotBlank(client_moniker)) {
|
||||||
|
param.put("client_moniker", getClient_moniker());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(short_name)) {
|
||||||
|
param.put("short_name", short_name);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(sub_merchant_id)) {
|
||||||
|
param.put("sub_merchant_id", sub_merchant_id);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(state)) {
|
||||||
|
param.put("state", state);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(suburb)) {
|
||||||
|
param.put("suburb", suburb);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(searchText)) {
|
||||||
|
param.put("search_text", searchText);
|
||||||
|
if (StringUtils.isNotBlank(textType)) {
|
||||||
|
param.put("text_type", textType);
|
||||||
|
} else {
|
||||||
|
param.put("text_type", "all");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (approving) {
|
||||||
|
param.put("approving", true);
|
||||||
|
}
|
||||||
|
if (org_id != null) {
|
||||||
|
param.put("org_id", org_id);
|
||||||
|
}
|
||||||
|
if (org_ids != null) {
|
||||||
|
param.put("org_ids", org_ids);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(bd)) {
|
||||||
|
param.put("bd_user", bd);
|
||||||
|
}
|
||||||
|
if (quickPass){
|
||||||
|
param.put("quickPass",true);
|
||||||
|
}
|
||||||
|
if (greenChannel){
|
||||||
|
param.put("greenChannel",true);
|
||||||
|
}
|
||||||
|
if (business_structure!=null && !business_structure.equals("")){
|
||||||
|
param.put("business_structure",business_structure);
|
||||||
|
}
|
||||||
|
if (industry!=null && !industry.equals("")){
|
||||||
|
param.put("industry",industry);
|
||||||
|
}
|
||||||
|
if (bd_city!=null && !bd_city.equals("")){
|
||||||
|
param.put("bd_city",bd_city);
|
||||||
|
}
|
||||||
|
if (clean_day!=null){
|
||||||
|
param.put("clean_day",clean_day);
|
||||||
|
}
|
||||||
|
if (surcharge_start_rate!=null) {
|
||||||
|
param.put("surcharge_start_rate",surcharge_start_rate);
|
||||||
|
}
|
||||||
|
if (surcharge_end_rate!=null){
|
||||||
|
param.put("surcharge_end_rate",surcharge_end_rate);
|
||||||
|
}
|
||||||
|
if (transaction_start_time != null) {
|
||||||
|
try {
|
||||||
|
param.put("transaction_start_time", format.parse(transaction_start_time));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new ParamInvalidException("transaction_start_time", "error.payment.valid.invalid_date_format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (transaction_end_time != null) {
|
||||||
|
try {
|
||||||
|
param.put("transaction_end_time", DateUtils.addDays(format.parse(transaction_end_time), 1));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new ParamInvalidException("transaction_end_time", "error.payment.valid.invalid_date_format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (create_start_time != null) {
|
||||||
|
try {
|
||||||
|
param.put("create_start_time", format.parse(create_start_time));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new ParamInvalidException("create_start_time", "error.payment.valid.invalid_date_format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (create_end_time != null) {
|
||||||
|
try {
|
||||||
|
param.put("create_end_time", DateUtils.addDays(format.parse(create_end_time), 1));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new ParamInvalidException("create_end_time", "error.payment.valid.invalid_date_format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (approve_start_time != null) {
|
||||||
|
try {
|
||||||
|
param.put("approve_start_time", format.parse(approve_start_time));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new ParamInvalidException("approve_start_time", "error.payment.valid.invalid_date_format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (approve_end_time != null) {
|
||||||
|
try {
|
||||||
|
param.put("approve_end_time", DateUtils.addDays(format.parse(approve_end_time), 1));
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new ParamInvalidException("approve_end_time", "error.payment.valid.invalid_date_format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (greenChannelBdTodo){
|
||||||
|
param.put("greenChannelBdTodo",true);
|
||||||
|
}
|
||||||
|
if (is_valid){
|
||||||
|
param.put("is_valid",true);
|
||||||
|
}
|
||||||
|
if (pass){
|
||||||
|
param.put("pass",true);
|
||||||
|
}
|
||||||
|
if (completed_contract){
|
||||||
|
param.put("completed_contract",true);
|
||||||
|
}
|
||||||
|
if (apply_to_back){
|
||||||
|
param.put("apply_to_back",true);
|
||||||
|
}
|
||||||
|
if (bd_upload_material){
|
||||||
|
param.put("bd_upload_material",true);
|
||||||
|
}
|
||||||
|
if (merchant_id != null){
|
||||||
|
param.put("merchant_id",merchant_id);
|
||||||
|
}
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(String state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTextType() {
|
||||||
|
return textType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTextType(String textType) {
|
||||||
|
this.textType = textType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSearchText() {
|
||||||
|
return searchText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSearchText(String searchText) {
|
||||||
|
this.searchText = searchText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrg_id() {
|
||||||
|
return org_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrg_id(String org_id) {
|
||||||
|
this.org_id = org_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnlyMe(boolean onlyMe) {
|
||||||
|
this.onlyMe = onlyMe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getOnlyMe() {
|
||||||
|
return onlyMe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isTempMchId() {
|
||||||
|
return tempMchId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTempMchId(boolean tempMchId) {
|
||||||
|
this.tempMchId = tempMchId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBusiness_structure() {
|
||||||
|
return business_structure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBusiness_structure(String business_structure) {
|
||||||
|
this.business_structure = business_structure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndustry() {
|
||||||
|
return industry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndustry(String industry) {
|
||||||
|
this.industry = industry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getClean_day() {
|
||||||
|
return clean_day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClean_day(Integer clean_day) {
|
||||||
|
this.clean_day = clean_day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBd_city() {
|
||||||
|
return bd_city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBd_city(String bd_city) {
|
||||||
|
this.bd_city = bd_city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreate_start_time() {
|
||||||
|
return create_start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreate_start_time(String create_start_time) {
|
||||||
|
this.create_start_time = create_start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApprove_start_time() {
|
||||||
|
return approve_start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApprove_start_time(String approve_start_time) {
|
||||||
|
this.approve_start_time = approve_start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreate_end_time() {
|
||||||
|
return create_end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreate_end_time(String create_end_time) {
|
||||||
|
this.create_end_time = create_end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApprove_end_time() {
|
||||||
|
return approve_end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApprove_end_time(String approve_end_time) {
|
||||||
|
this.approve_end_time = approve_end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSurcharge_start_rate() {
|
||||||
|
return surcharge_start_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSurcharge_start_rate(String surcharge_start_rate) {
|
||||||
|
this.surcharge_start_rate = surcharge_start_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransaction_start_time() {
|
||||||
|
return transaction_start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransaction_start_time(String transaction_start_time) {
|
||||||
|
this.transaction_start_time = transaction_start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransaction_end_time() {
|
||||||
|
return transaction_end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransaction_end_time(String transaction_end_time) {
|
||||||
|
this.transaction_end_time = transaction_end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSurcharge_end_rate() {
|
||||||
|
return surcharge_end_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSurcharge_end_rate(String surcharge_end_rate) {
|
||||||
|
this.surcharge_end_rate = surcharge_end_rate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOnlyMe() {
|
||||||
|
return onlyMe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isApproving() {
|
||||||
|
return approving;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApproving(boolean approving) {
|
||||||
|
this.approving = approving;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isQuickPass() {
|
||||||
|
return quickPass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuickPass(boolean quickPass) {
|
||||||
|
this.quickPass = quickPass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGreenChannel() {
|
||||||
|
return greenChannel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGreenChannel(boolean greenChannel) {
|
||||||
|
this.greenChannel = greenChannel;
|
||||||
|
}
|
||||||
|
public void setGreenChannelAndBDtodo(boolean bDTodo){
|
||||||
|
this.greenChannelBdTodo = bDTodo;
|
||||||
|
}
|
||||||
|
public void setIs_valid(boolean is_valid){
|
||||||
|
this.is_valid=is_valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateFormat getFormat() {
|
||||||
|
return format;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isGreenChannelBdTodo() {
|
||||||
|
return greenChannelBdTodo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGreenChannelBdTodo(boolean greenChannelBdTodo) {
|
||||||
|
this.greenChannelBdTodo = greenChannelBdTodo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPass() {
|
||||||
|
return pass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPass(boolean pass) {
|
||||||
|
this.pass = pass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCompleted_contract() {
|
||||||
|
return completed_contract;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompleted_contract(boolean completed_contract) {
|
||||||
|
this.completed_contract = completed_contract;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isApply_to_back() {
|
||||||
|
return apply_to_back;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApply_to_back(boolean apply_to_back) {
|
||||||
|
this.apply_to_back = apply_to_back;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBd_upload_material() {
|
||||||
|
return bd_upload_material;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBd_upload_material(boolean bd_upload_material) {
|
||||||
|
this.bd_upload_material = bd_upload_material;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isIs_valid() {
|
||||||
|
return is_valid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrg_ids() {
|
||||||
|
return org_ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrg_ids(String org_ids) {
|
||||||
|
this.org_ids = org_ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBd(String bd) {
|
||||||
|
this.bd = bd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMerchant_id() {
|
||||||
|
return merchant_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMerchant_id(String merchant_id) {
|
||||||
|
this.merchant_id = merchant_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuburb() {
|
||||||
|
return suburb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuburb(String suburb) {
|
||||||
|
this.suburb = suburb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package au.com.royalpay.payment.manage.appclient.core;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
|
||||||
|
import au.com.royalpay.payment.manage.product.beans.ProductBean;
|
||||||
|
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface ManageAppService {
|
||||||
|
|
||||||
|
void updateDevToken(JSONObject device, String devToken);
|
||||||
|
|
||||||
|
void updateDevTokenStatus(String devId, int status);
|
||||||
|
|
||||||
|
JSONObject getDevTokenByDevId(String dev_id);
|
||||||
|
|
||||||
|
void sign_out(JSONObject device);
|
||||||
|
|
||||||
|
void changeAccountPassword(JSONObject device, ChangePwdBean change, String manager_id);
|
||||||
|
|
||||||
|
List<JSONObject> getReferrerList(JSONObject device);
|
||||||
|
|
||||||
|
JSONObject registerClient(JSONObject device, ClientRegisterInfo registery);
|
||||||
|
|
||||||
|
void updateClientRegisterInfo(JSONObject device, String clientMoniker, ClientRegisterInfo info);
|
||||||
|
|
||||||
|
void disableClientRegisterInfo(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
JSONObject listPartners(JSONObject device, AppMerchantBean query);
|
||||||
|
|
||||||
|
JSONObject clientDetail(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
JSONObject clientBankAccount(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
void saveBankAccount(JSONObject device, String clientMoniker, BankAccountInfo bankAccount);
|
||||||
|
|
||||||
|
void newConfigRate(JSONObject device, String clientMoniker, JSONObject config);
|
||||||
|
|
||||||
|
void commitToGreenChannel(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
void commitToDoAgreeFile(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
void commitToCompliance(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
JSONObject getAuthFiles(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
void uploadAuthFiles(JSONObject device, String clientMoniker, ClientAuthFilesInfo filesInfo);
|
||||||
|
|
||||||
|
Map<String, List<JSONObject>> getRates(JSONObject device, String clientMoniker);
|
||||||
|
|
||||||
|
JSONObject getConfigRates(JSONObject device);
|
||||||
|
|
||||||
|
JSONObject getNewVersion(JSONObject device);
|
||||||
|
|
||||||
|
JSONObject getCommons(JSONObject device);
|
||||||
|
|
||||||
|
List<JSONObject> getOrgPrizeList(JSONObject device);
|
||||||
|
|
||||||
|
JSONObject getBdConfigKpi(JSONObject device);
|
||||||
|
|
||||||
|
List<JSONObject> getBdPrizeList(JSONObject device);
|
||||||
|
|
||||||
|
JSONObject getPrizeRulesUrl(JSONObject device);
|
||||||
|
|
||||||
|
JSONObject listProduct(JSONObject device, ProductBean productBean);
|
||||||
|
|
||||||
|
void saveProduct(JSONObject device, ProductBean productBean);
|
||||||
|
|
||||||
|
void updateProduct(JSONObject device, ProductBean productBean);
|
||||||
|
|
||||||
|
void deleteProduct(JSONObject device, String commodity_id);
|
||||||
|
}
|
@ -0,0 +1,203 @@
|
|||||||
|
package au.com.royalpay.payment.manage.appclient.web;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
|
||||||
|
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
|
||||||
|
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
|
||||||
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
||||||
|
import au.com.royalpay.payment.manage.product.beans.ProductBean;
|
||||||
|
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
||||||
|
import au.com.royalpay.payment.tools.CommonConsts;
|
||||||
|
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
|
||||||
|
import au.com.royalpay.payment.tools.device.manageadvise.AppClientController;
|
||||||
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
||||||
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
||||||
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.validation.Errors;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@AppClientController
|
||||||
|
@RequestMapping("/api/v1.0/manage/app")
|
||||||
|
public class ManageAppController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ManageAppService manageAppService;
|
||||||
|
@Resource
|
||||||
|
private AttachmentClient attachmentClient;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/token", method = RequestMethod.PUT)
|
||||||
|
public void updateDevToken(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestBody JSONObject token) {
|
||||||
|
manageAppService.updateDevToken(device, token.getString("devToken"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/sign_out", method = RequestMethod.PUT)
|
||||||
|
public void signOut(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.sign_out(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/manager_password/{manager_id}", method = RequestMethod.PUT)
|
||||||
|
public void changePassword(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String manager_id,
|
||||||
|
@RequestBody @Valid ChangePwdBean change, Errors errors) {
|
||||||
|
HttpUtils.handleValidErrors(errors);
|
||||||
|
manageAppService.changeAccountPassword(device, change, manager_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/referrer", method = RequestMethod.GET)
|
||||||
|
public List<JSONObject> getReferrerList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getReferrerList(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/attachment/files", method = RequestMethod.POST)
|
||||||
|
public JSONObject uploadImage(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestParam MultipartFile file) throws Exception {
|
||||||
|
return attachmentClient.uploadFile(file, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/register", method = RequestMethod.POST)
|
||||||
|
public JSONObject registerPartner(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestBody @Valid ClientRegisterInfo registery,
|
||||||
|
Errors errors) {
|
||||||
|
HttpUtils.handleValidErrors(errors);
|
||||||
|
return manageAppService.registerClient(device, registery);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/update", method = RequestMethod.PUT)
|
||||||
|
public void updatePartnerInfo(@PathVariable String clientMoniker, @RequestBody ClientRegisterInfo info,
|
||||||
|
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.updateClientRegisterInfo(device, clientMoniker, info);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/delete", method = RequestMethod.PUT)
|
||||||
|
public void disablePartnerInfo(@PathVariable String clientMoniker,
|
||||||
|
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.disableClientRegisterInfo(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchants", method = RequestMethod.GET)
|
||||||
|
public JSONObject listPartners(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, AppMerchantBean query) {
|
||||||
|
return manageAppService.listPartners(device, query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/detail", method = RequestMethod.GET)
|
||||||
|
public JSONObject getClientByMoniker(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.clientDetail(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/bank_account", method = RequestMethod.GET)
|
||||||
|
public JSONObject getBankAccount(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.clientBankAccount(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/bank_account", method = RequestMethod.PUT)
|
||||||
|
public void saveBankAccount(@PathVariable String clientMoniker, @RequestBody @Valid BankAccountInfo bankAccount, Errors errors,
|
||||||
|
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
HttpUtils.handleValidErrors(errors);
|
||||||
|
manageAppService.saveBankAccount(device, clientMoniker, bankAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/rates", method = RequestMethod.GET)
|
||||||
|
public Map<String,List<JSONObject>> getRates(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getRates(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/rate_config", method = RequestMethod.GET)
|
||||||
|
public JSONObject getConfigRates(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getConfigRates(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/rates", method = RequestMethod.POST)
|
||||||
|
public void newRate(@PathVariable String clientMoniker, @RequestBody JSONObject config, Errors errors,
|
||||||
|
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
HttpUtils.handleValidErrors(errors);
|
||||||
|
manageAppService.newConfigRate(device, clientMoniker, config);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/compliance/green_channel", method = RequestMethod.PUT)
|
||||||
|
public void commitToGreenChannel(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.commitToGreenChannel(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/make_agree_file", method = RequestMethod.PUT)
|
||||||
|
public void commitToDoAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.commitToDoAgreeFile(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/to_compliance", method = RequestMethod.PUT)
|
||||||
|
public void commitToCompliance(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.commitToCompliance(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/file", method = RequestMethod.GET)
|
||||||
|
public JSONObject getAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getAuthFiles(device, clientMoniker);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/merchant/{clientMoniker}/file", method = RequestMethod.PUT)
|
||||||
|
public void uploadAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientAuthFilesInfo filesInfo, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
manageAppService.uploadAuthFiles(device, clientMoniker, filesInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/version", method = RequestMethod.GET)
|
||||||
|
public JSONObject getAppVersion(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getNewVersion(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/commons", method = RequestMethod.GET)
|
||||||
|
public JSONObject getCommons(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getCommons(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/org_prize/list", method = RequestMethod.GET)
|
||||||
|
public List<JSONObject> getOrgPrizeList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getOrgPrizeList(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bd/kpi", method = RequestMethod.GET)
|
||||||
|
public JSONObject getBdConfigKpi(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getBdConfigKpi(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bd/list", method = RequestMethod.GET)
|
||||||
|
public List<JSONObject> getBdPrizeList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getBdPrizeList(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/prize/rules", method = RequestMethod.GET)
|
||||||
|
public JSONObject getPrizeRulesUrl(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
|
||||||
|
return manageAppService.getPrizeRulesUrl(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/product/list", method = RequestMethod.GET)
|
||||||
|
public JSONObject listProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, ProductBean productBean) {
|
||||||
|
return manageAppService.listProduct(device, productBean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/product/save", method = RequestMethod.POST)
|
||||||
|
public void saveProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device,@RequestBody ProductBean productBean) {
|
||||||
|
manageAppService.saveProduct(device, productBean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/product/update", method = RequestMethod.PUT)
|
||||||
|
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device,@RequestBody ProductBean productBean) {
|
||||||
|
manageAppService.updateProduct(device, productBean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/product/delete/{commodity_id}", method = RequestMethod.PUT)
|
||||||
|
public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String commodity_id) {
|
||||||
|
manageAppService.deleteProduct(device, commodity_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
package au.com.royalpay.payment.manage.dev.web;
|
||||||
|
|
||||||
|
import au.com.royalpay.payment.manage.bdprize.core.BDPrizeService;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/rules")
|
||||||
|
public class MangerAppRulesController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BDPrizeService bdPrizeService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/org", method = RequestMethod.GET)
|
||||||
|
public ModelAndView hrefOrgRules() {
|
||||||
|
ModelAndView view = new ModelAndView("app/org_prize_rules");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bd", method = RequestMethod.GET)
|
||||||
|
public ModelAndView hrefBdRules() {
|
||||||
|
ModelAndView view = new ModelAndView("app/bd_prize_rules");
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bd/config", method = RequestMethod.GET)
|
||||||
|
public List<JSONObject> bdConfigRates() {
|
||||||
|
return bdPrizeService.getRateConfig();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package au.com.royalpay.payment.manage.mappers.system;
|
||||||
|
|
||||||
|
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
||||||
|
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
||||||
|
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by yixian on 2016-09-12.
|
||||||
|
*/
|
||||||
|
@AutoMapper(tablename = "sys_manage_devices_token", pkName = "dev_token_id")
|
||||||
|
public interface ManageDeviceTokenMapper {
|
||||||
|
|
||||||
|
JSONObject findByDevId(@Param("dev_id") String devDevId);
|
||||||
|
|
||||||
|
@AutoSql(type = SqlType.UPDATE)
|
||||||
|
void update(JSONObject devInfo);
|
||||||
|
|
||||||
|
@AutoSql(type = SqlType.INSERT)
|
||||||
|
void save(JSONObject devTokenInfo);
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||||
spring.datasource.schema-name=royalpay_production
|
spring.datasource.schema-name=royalpay_production
|
||||||
spring.datasource.host=192.168.0.111:3306
|
spring.datasource.host=192.168.0.18:3306
|
||||||
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
|
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=root
|
spring.datasource.password=root
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||||
spring.datasource.schema-name=royalpay_production
|
spring.datasource.schema-name=royalpay_production
|
||||||
spring.datasource.host=192.168.0.49:3306
|
spring.datasource.host=127.0.0.1:3306
|
||||||
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
|
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||||
spring.datasource.username=root
|
spring.datasource.username=root
|
||||||
spring.datasource.password=root
|
spring.datasource.password=root
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ManageDeviceTokenMapper">
|
||||||
|
|
||||||
|
<select id="findByDevId" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT * FROM sys_manage_devices_token where dev_id=#{dev_id} limit 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,54 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "立牌",
|
||||||
|
"value": "qrcode"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "POS",
|
||||||
|
"value": "pos"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label": "门店",
|
||||||
|
"value": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "ipos",
|
||||||
|
"value": "ipos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "银豹",
|
||||||
|
"value": "pospal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "aupos",
|
||||||
|
"value": "aupos"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "其他",
|
||||||
|
"value": "other"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label": "收银系统",
|
||||||
|
"value": "2"
|
||||||
|
},{
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"children": [],
|
||||||
|
"label": "无门店",
|
||||||
|
"value": "no-store"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label": "其他",
|
||||||
|
"value": "3"
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,59 @@
|
|||||||
|
<div class="modal-header">
|
||||||
|
<h4>New Manager Device</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form novalidate name="deviceForm">
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':deviceForm.client_dev_id.$invalid && deviceForm.client_dev_id.$dirty}">
|
||||||
|
<label class="control-label" for="client_dev_id-input">* Device No</label>
|
||||||
|
<input required class="form-control text-lowercase" id="client_dev_id-input" name="client_dev_id"
|
||||||
|
ng-model="device.client_dev_id" maxlength="25">
|
||||||
|
<div ng-messages="deviceForm.client_dev_id.$error" ng-if="deviceForm.client_dev_id.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Device No Cannot Be Empty</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':deviceForm.auth_code.$invalid && deviceForm.auth_code.$dirty}">
|
||||||
|
<label class="control-label" for="auth_code-input">* Device Key</label>
|
||||||
|
<input required class="form-control" id="auth_code-input" name="auth_code"
|
||||||
|
ng-model="device.auth_code" maxlength="50">
|
||||||
|
<div ng-messages="deviceForm.auth_code.$error" ng-if="deviceForm.auth_code.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Device Key Cannot Be Empty</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label" for="client_type-input">Device Type</label>
|
||||||
|
<input class="form-control" id="client_type-input" name="client_type"
|
||||||
|
ng-init="device.client_type='inspiry'" placeholder="inspiry"
|
||||||
|
ng-model="device.client_type" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':deviceForm.version.$invalid && deviceForm.version.$dirty}">
|
||||||
|
<label class="control-label" for="version-input">* version</label>
|
||||||
|
<input required class="form-control" id="version-input" name="version"
|
||||||
|
ng-model="device.version" maxlength="10">
|
||||||
|
<div ng-messages="deviceForm.version.$error" ng-if="deviceForm.version.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Version No Cannot Be Empty</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group"
|
||||||
|
ng-class="{'has-error':deviceForm.remark.$invalid && deviceForm.remark.$dirty}">
|
||||||
|
<label class="control-label" for="remark-input">* Remark</label>
|
||||||
|
<input required class="form-control" id="remark-input" name="remark"
|
||||||
|
ng-model="device.remark" maxlength="50">
|
||||||
|
<div ng-messages="deviceForm.remark.$error" ng-if="deviceForm.remark.$dirty">
|
||||||
|
<p class="small text-danger" ng-message="required">Remark Cannot Be Empty</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-success" type="button" ng-click="save(deviceForm)">Submit</button>
|
||||||
|
</div>
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in new issue