public interface ShopPaytypeConfigDao extends JpaRepository<TShopPaytypeConfig, String> {
@Query("select a from TShopPaytypeConfig a where a.paytype=?1 and a.shopaccno=?2 ")
List<TShopPaytypeConfig> getShopPaytypeConfigs(String paytype, String shopaccno);
+
+ @Query("select a from TShopPaytypeConfig a where a.shopaccno=?1 and a.paytype=?2 and a.configid=?3 ")
+ TShopPaytypeConfig getShopPaytypeConfigById(String shopaccno,String paytype, String configid);
}
@GenericGenerator(name = "idGenerator", strategy = "uuid")
@GeneratedValue(generator = "idGenerator")
@Column(name = "CFGID", nullable = false, length = 32)
- private Integer cfgid;
+ private String cfgid;
@Column(name = "SHOPACCNO", nullable = false, length = 10)
private String shopaccno;
this.configName = configName;
}
- public Integer getCfgid() {
+ public String getCfgid() {
return cfgid;
}
- public void setCfgid(Integer cfgid) {
+ public void setCfgid(String cfgid) {
this.cfgid = cfgid;
}
private boolean open;
private Integer shoptype; //商户类别,商户树用到
+ private String shopaccno; //商户账号
private String iconSkin; //自定义图标
public boolean isOpen() {
this.shoptype = shoptype;
}
+ public String getShopaccno() {
+ return shopaccno;
+ }
+
+ public void setShopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ }
+
public String getIconSkin() {
return iconSkin;
}
import com.supwisdom.dlpay.api.bean.JsonResult;
import com.supwisdom.dlpay.api.domain.TPaytype;
import com.supwisdom.dlpay.api.domain.TShopPaytype;
+import com.supwisdom.dlpay.api.domain.TShopPaytypeConfig;
import com.supwisdom.dlpay.framework.domain.TShop;
+import com.supwisdom.dlpay.framework.domain.TShopacc;
+import com.supwisdom.dlpay.framework.service.SystemUtilService;
import com.supwisdom.dlpay.framework.util.PageResult;
import com.supwisdom.dlpay.framework.util.StringUtil;
import com.supwisdom.dlpay.framework.util.TradeDict;
import com.supwisdom.dlpay.framework.util.WebConstant;
import com.supwisdom.dlpay.system.bean.ShopConfigBean;
+import com.supwisdom.dlpay.system.service.ParamService;
import com.supwisdom.dlpay.system.service.ShopDataService;
+import com.supwisdom.dlpay.util.ConstantUtil;
import com.supwisdom.dlpay.util.WebCheckException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
+import java.util.List;
+import java.util.Map;
+
@Controller
public class ShopController {
@Autowired
private ShopDataService shopDataService;
+ @Autowired
+ private ParamService paramService;
+ @Autowired
+ private SystemUtilService systemUtilService;
@GetMapping("/shop/index")
public String shopView() {
@GetMapping("/shop/shoptree")
@PreAuthorize("hasPermission('/shop/index','')")
@ResponseBody
- public JsonResult shopTreeData(){
+ public JsonResult shopTreeData() {
return JsonResult.ok("OK").put("data", shopDataService.getAllShopNodes());
}
@ResponseBody
public JsonResult deleteShop(@RequestParam("shopid") Integer shopid) {
TShop shop = shopDataService.getShopByShopid(shopid);
- if(null==shop){
+ if (null == shop) {
return JsonResult.error("商户不存在,请重新查询"); //商户不存在,请重新查询
}
- try{
- if(shopDataService.deleteShop(shop)){
+ try {
+ if (shopDataService.deleteShop(shop)) {
return JsonResult.ok("删除成功");
- }else{
+ } else {
return JsonResult.error("删除失败");
}
- }catch (WebCheckException ex){
+ } catch (WebCheckException ex) {
return JsonResult.error(ex.getMessage());
- }catch (Exception e){
+ } catch (Exception e) {
return JsonResult.error("系统处理异常").put("exception", e);
}
}
shop.setAddr(addr == null ? null : addr.trim());
shop.setZipcode(zipcode == null ? null : zipcode.trim());
- try{
- if(shopDataService.saveOrUpdateShop(shop)){
- return JsonResult.ok(addflag?"新增成功":"修改成功").put("shop",shop);
- }else{
- return JsonResult.error(addflag?"新增失败":"修改失败");
+ try {
+ if (shopDataService.saveOrUpdateShop(shop)) {
+ return JsonResult.ok(addflag ? "新增成功" : "修改成功").put("shop", shop);
+ } else {
+ return JsonResult.error(addflag ? "新增失败" : "修改失败");
}
- }catch (WebCheckException ex){
+ } catch (WebCheckException ex) {
return JsonResult.error(ex.getMessage());
- }catch (Exception e){
+ } catch (Exception e) {
+ e.printStackTrace();
return JsonResult.error("系统处理异常").put("exception", e);
}
}
/**
* ====================================================
- * 商户支付能力配置
+ * 商户支付能力配置
* ====================================================
*/
@GetMapping("/shop/config")
@GetMapping("/shop/shopacctree")
@PreAuthorize("hasPermission('/shop/config','')")
@ResponseBody
- public JsonResult shopaccTreeData(){
+ public JsonResult shopaccTreeData() {
return JsonResult.ok("OK").put("data", shopDataService.getAllShopNodes());
}
@ResponseBody
public PageResult<ShopConfigBean> getShopPaytypeList(@RequestParam("page") Integer pageNo,
@RequestParam("limit") Integer pageSize,
- @RequestParam(value = "shopid", required = false) Integer shopid,
@RequestParam(value = "paytype", required = false) String paytype,
@RequestParam(value = "shopaccno", required = false) String shopaccno) {
try {
if (null == pageNo || pageNo < 1) pageNo = WebConstant.PAGENO_DEFAULT;
if (null == pageSize || pageSize < 1) pageSize = WebConstant.PAGESIZE_DEFAULT;
- return shopDataService.getShopPaytypeInfos(shopaccno, paytype, shopid, pageNo, pageSize);
+ return shopDataService.getShopPaytypeInfos(shopaccno, paytype, pageNo, pageSize);
} catch (Exception e) {
e.printStackTrace();
return new PageResult<>(99, "系统查询错误");
}
}
+ @PostMapping("/shop/updatepaytypestat")
+ @PreAuthorize("hasPermission('/shop/updatepaytypestat','')")
+ @ResponseBody
+ public JsonResult updateShopPaytypeStat(@RequestParam("shopaccno") String shopaccno, @RequestParam("paytype") String paytype,
+ @RequestParam("state") String state, @RequestParam("optype") String optype) {
+ if (StringUtil.isEmpty(shopaccno) || StringUtil.isEmpty(paytype)
+ || (!ConstantUtil.ENABLE_NO.equals(state) && !ConstantUtil.ENABLE_YES.equals(state))
+ || (!"consume".equals(optype) && !"anonymous".equals(optype) && !"reverse".equals(optype))) {
+ return JsonResult.error("参数传递错误");
+ }
+
+ try {
+ TShopPaytype shopPaytype = shopDataService.getShopPaytype(shopaccno.trim(), paytype.trim());
+ if (null == shopPaytype) {
+ return JsonResult.error("商户支付能力不存在!");
+ }
+
+ if ("consume".equals(optype)) {
+ if (state.equals(shopPaytype.getConsumeEnable())) {
+ return JsonResult.error("状态错误,请重新查询后操作");
+ }
+ shopPaytype.setConsumeEnable(state);
+ } else if ("anonymous".equals(optype)) {
+ if (state.equals(shopPaytype.getAnonymousEnable())) {
+ return JsonResult.error("状态错误,请重新查询后操作");
+ }
+ shopPaytype.setAnonymousEnable(state);
+ } else if ("reverse".equals(optype)) {
+ if (state.equals(shopPaytype.getReverseEnable())) {
+ return JsonResult.error("状态错误,请重新查询后操作");
+ }
+ shopPaytype.setReverseEnable(state);
+ }
+
+ if (shopDataService.saveOrUpdateShopPaytype(shopPaytype)) {
+ return JsonResult.ok(ConstantUtil.ENABLE_YES.equals(state) ? "启用成功" : "关闭成功");
+ } else {
+ return JsonResult.error(ConstantUtil.ENABLE_YES.equals(state) ? "启用失败" : "关闭失败");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return JsonResult.error("系统处理异常").put("exception", e);
+ }
+ }
+
+ @GetMapping("/shop/load4addpaytype")
+ @PreAuthorize("hasPermission('/shop/load4addpaytype','')")
+ public String load4AddShopPaytype(Model model){
+ model.addAttribute("paytypelist", shopDataService.getConsumePaytypes());
+ return "system/shop/configform";
+ }
+
+ @PostMapping("/shop/addshoppaytype")
+ @PreAuthorize("hasPermission('/shop/addshoppaytype','')")
+ @ResponseBody
+ public JsonResult addShoppaytype(@RequestParam("shopaccno") String shopaccno,
+ @RequestParam("paytype") String paytype,
+ @RequestParam(value = "consumeEnable", required = false, defaultValue = "no") String consumeEnable,
+ @RequestParam(value = "anonymousEnable", required = false, defaultValue = "no") String anonymousEnable,
+ @RequestParam(value = "reverseEnable", required = false, defaultValue = "no") String reverseEnable) {
+ if(StringUtil.isEmpty(shopaccno) || StringUtil.isEmpty(paytype)){
+ return JsonResult.error("参数传递错误");
+ }
+ try {
+ TShopacc shopacc = shopDataService.getShopaccByAccno(shopaccno.trim());
+ TPaytype tPaytype = paramService.getPaytype(paytype.trim());
+ if (null == shopacc) {
+ return JsonResult.error("商户账户不存在!");
+ }
+ if (null == tPaytype) {
+ return JsonResult.error("支付方式在系统中不存在!");
+ }
+ TShopPaytype shopPaytype = shopDataService.getShopPaytype(shopaccno.trim(), paytype.trim());
+ if (null != shopPaytype) {
+ return JsonResult.error("商户该支付能力已经存在!");
+ }
+ shopPaytype = new TShopPaytype();
+ shopPaytype.setShopaccno(shopacc.getShopaccno());
+ shopPaytype.setPaytype(tPaytype.getPaytype());
+ shopPaytype.setConsumeEnable(ConstantUtil.ENABLE_YES.equalsIgnoreCase(consumeEnable) ? ConstantUtil.ENABLE_YES : ConstantUtil.ENABLE_NO);
+ shopPaytype.setAnonymousEnable(ConstantUtil.ENABLE_YES.equalsIgnoreCase(anonymousEnable) ? ConstantUtil.ENABLE_YES : ConstantUtil.ENABLE_NO);
+ shopPaytype.setReverseEnable(ConstantUtil.ENABLE_YES.equalsIgnoreCase(reverseEnable) ? ConstantUtil.ENABLE_YES : ConstantUtil.ENABLE_NO);
+ shopPaytype.setCreatetime(systemUtilService.getSysdatetime().getHostdatetime());
+ if (shopDataService.saveOrUpdateShopPaytype(shopPaytype)) {
+ return JsonResult.ok("新增成功");
+ } else {
+ return JsonResult.error("新增失败");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return JsonResult.error("系统处理异常").put("exception", e);
+ }
+ }
+
+ @GetMapping("/shop/load4paytypepara")
+ @PreAuthorize("hasPermission('/shop/load4paytypepara','')")
+ public String load4AddShopPaytypePara(@RequestParam("shopaccno") String shopaccno,
+ @RequestParam("paytype") String paytype,
+ Model model) {
+ List<TShopPaytypeConfig> configList = shopDataService.getShopPaytypeConfigs(shopaccno, paytype);
+ model.addAttribute("configlist", configList);
+ model.addAttribute("shopaccno", shopaccno);
+ model.addAttribute("paytype", paytype);
+ return "system/shop/configpara";
+ }
+
+ @PostMapping("/shop/addpaytypepara")
+ @PreAuthorize("hasPermission('/shop/addpaytypepara','')")
+ @ResponseBody
+ public JsonResult addShopPaytypePara(@RequestBody Map<String, String> param) {
+ String shopaccnoHtmlKey = "hid_shopaccno"; //页面上传来shopaccno的KEY
+ String paytypeHtmlKey = "hid_paytype"; //页面上传来paytype的KEY
+ if (null == param || StringUtil.isEmpty(param.get(paytypeHtmlKey)) || StringUtil.isEmpty(param.get(shopaccnoHtmlKey))) {
+ return JsonResult.error("参数传递错误");
+ }
+ try {
+ String shopaccno = param.get(shopaccnoHtmlKey).trim();
+ String paytype = param.get(paytypeHtmlKey).trim();
+ param.remove(shopaccnoHtmlKey);
+ param.remove(paytypeHtmlKey);
+ if (shopDataService.saveOrUpdateShopPaytypeConfig(shopaccno, paytype, param)) {
+ return JsonResult.ok("配置成功");
+ } else {
+ return JsonResult.error("配置失败");
+ }
+ } catch (WebCheckException ex) {
+ return JsonResult.error(ex.getMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ return JsonResult.error("系统处理异常").put("exception", e);
+ }
+ }
+
+
+
}
package com.supwisdom.dlpay.system.service;
import com.supwisdom.dlpay.api.domain.TPaytype;
+import com.supwisdom.dlpay.api.domain.TShopPaytype;
+import com.supwisdom.dlpay.api.domain.TShopPaytypeConfig;
import com.supwisdom.dlpay.framework.domain.TShop;
+import com.supwisdom.dlpay.framework.domain.TShopacc;
import com.supwisdom.dlpay.framework.util.PageResult;
import com.supwisdom.dlpay.system.bean.ShopConfigBean;
import com.supwisdom.dlpay.system.bean.ZTreeNode;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
+import java.util.Map;
public interface ShopDataService {
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class,readOnly = true)
List<TPaytype> getConsumePaytypes();
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class,readOnly = true)
- PageResult<ShopConfigBean> getShopPaytypeInfos(String shopaccno, String paytype, Integer shopid, int pageNo, int pageSize);
+ PageResult<ShopConfigBean> getShopPaytypeInfos(String shopaccno, String paytype, int pageNo, int pageSize);
+
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class,readOnly = true)
+ TShopPaytype getShopPaytype(String shopaccno, String paytype);
+
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class,readOnly = true)
+ TShopacc getShopaccByAccno(String shopaccno);
+
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
+ boolean saveOrUpdateShopPaytype(TShopPaytype shopPaytype);
+
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class,readOnly = true)
+ List<TShopPaytypeConfig> getShopPaytypeConfigs(String shopaccno, String paytype);
+
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
+ boolean saveOrUpdateShopPaytypeConfig(String shopaccno, String paytype, Map<String, String> param) throws WebCheckException;
+
+
}
package com.supwisdom.dlpay.system.service.impl;
+import com.supwisdom.dlpay.api.dao.PaytypeConfigDao;
import com.supwisdom.dlpay.api.dao.PaytypeDao;
+import com.supwisdom.dlpay.api.dao.ShopPaytypeConfigDao;
import com.supwisdom.dlpay.api.dao.ShopPaytypeDao;
import com.supwisdom.dlpay.api.domain.TPaytype;
+import com.supwisdom.dlpay.api.domain.TPaytypeConfig;
import com.supwisdom.dlpay.api.domain.TShopPaytype;
+import com.supwisdom.dlpay.api.domain.TShopPaytypeConfig;
import com.supwisdom.dlpay.framework.dao.ShopDao;
import com.supwisdom.dlpay.framework.dao.ShopaccDao;
import com.supwisdom.dlpay.framework.data.SystemDateTime;
import javax.persistence.criteria.*;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
@Service
public class ShopDataServiceImpl implements ShopDataService {
private SystemUtilService systemUtilService;
@Autowired
private PaytypeDao paytypeDao;
+ @Autowired
+ private PaytypeConfigDao paytypeConfigDao;
+ @Autowired
+ private ShopPaytypeConfigDao shopPaytypeConfigDao;
@Override
public List<ZTreeNode> getAllShopNodes() {
if (null == shop || !TradeDict.STATUS_NORMAL.equals(shop.getStatus())) continue; //跳过注销商户
ZTreeNode node = new ZTreeNode();
node.setId(shop.getShopid().toString());
- node.setName(shop.getShopid()+"_"+shop.getShopname());
+ node.setName(shop.getShopid() + "_" + shop.getShopname());
node.setpId(shop.getFshopid() == null ? "" : shop.getFshopid().toString());
node.setChecked(false);
node.setOpen(true);
node.setShoptype(shop.getShoptype());
- node.setIconSkin(shop.getShoptype()==0?"pIcon01":"pIcon02");
+ node.setShopaccno(StringUtil.isEmpty(shop.getShopaccno()) ? "" : shop.getShopaccno());
+ node.setIconSkin(shop.getShoptype() == 0 ? "pIcon01" : "pIcon02");
result.add(node);
}
}
}
@Override
- public boolean deleteShop(TShop shop) throws WebCheckException{
- if(null!=shop){
+ public boolean deleteShop(TShop shop) throws WebCheckException {
+ if (null != shop) {
List<TShop> childShops = shopDao.getChildShopsByShopid(shop.getShopid());
- if(!StringUtil.isEmpty(childShops))
+ if (!StringUtil.isEmpty(childShops))
throw new WebCheckException("请先删除下级商户");
shop.setStatus(TradeDict.STATUS_CLOSED);
shop.setClosedate(systemUtilService.getSysdatetime().getHostdate());
shopDao.save(shop);
- if(!StringUtil.isEmpty(shop.getShopaccno())){
- TShopacc shopacc=shopaccDao.getByShopaccno(shop.getShopaccno());
- if(null==shopacc) throw new WebCheckException("数据异常!对应的商户账户不存在!");
+ if (!StringUtil.isEmpty(shop.getShopaccno())) {
+ TShopacc shopacc = shopaccDao.getByShopaccno(shop.getShopaccno());
+ if (null == shopacc) throw new WebCheckException("数据异常!对应的商户账户不存在!");
shopacc.setStatus(TradeDict.STATUS_CLOSED);
shopacc.setClosedate(shop.getClosedate());
shopaccDao.save(shopacc);
TShop fshop = shopDao.getTShopByShopid(shop.getFshopid());
if (null == fshop) {
throw new WebCheckException("上级商户不存在!");
- }else if(fshop.getShoptype()==1){
+ } else if (fshop.getShoptype() == 1) {
throw new WebCheckException("上级商户不是商户组!");
}
}
shopacc.setBalance(0D);
shopaccDao.save(shopacc);
+ shop.setShopaccno(shopacc.getShopaccno());
+ shopDao.save(shop);
+
TShopPaytype shopPaytype = new TShopPaytype();
shopPaytype.setShopaccno(shopacc.getShopaccno());
shopPaytype.setPaytype(TradeDict.PAYTYPE_BALANCE);
}
@Override
- public PageResult<ShopConfigBean> getShopPaytypeInfos(String shopaccno, String paytype, Integer shopid, int pageNo, int pageSize) {
+ public PageResult<ShopConfigBean> getShopPaytypeInfos(String shopaccno, String paytype, int pageNo, int pageSize) {
Pageable pageable = PageRequest.of(pageNo - 1, pageSize, Sort.by("shopaccno", "paytype"));
Page<TShopPaytype> page = shopPaytypeDao.findAll(new Specification<TShopPaytype>() {
if (!StringUtil.isEmpty(paytype)) {
predicates.add(criteriaBuilder.equal(root.get("paytype").as(String.class), paytype.trim()));
}
- if (null != shopid) {
- Join<TShopPaytype, TShopacc> joinShopacc = root.join("shopaccno", JoinType.LEFT);
- predicates.add(criteriaBuilder.equal(joinShopacc.get("shopid").as(Integer.class), shopid));
- }
return criteriaBuilder.and(predicates.toArray(new Predicate[0]));
}
}, pageable);
return new PageResult<>(page.getTotalElements(), list);
}
+ @Override
+ public TShopPaytype getShopPaytype(String shopaccno, String paytype) {
+ return shopPaytypeDao.getById(paytype, shopaccno);
+ }
+
+ @Override
+ public TShopacc getShopaccByAccno(String shopaccno) {
+ if(!StringUtil.isEmpty(shopaccno)){
+ return shopaccDao.getByShopaccno(shopaccno.trim());
+ }
+ return null;
+ }
+
+ @Override
+ public boolean saveOrUpdateShopPaytype(TShopPaytype shopPaytype) {
+ if (null != shopPaytype) {
+ shopPaytypeDao.save(shopPaytype);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public List<TShopPaytypeConfig> getShopPaytypeConfigs(String shopaccno, String paytype) {
+ List<TShopPaytypeConfig> result = new ArrayList<>(0);
+ if (!StringUtil.isEmpty(paytype)) {
+ List<TPaytypeConfig> list = paytypeConfigDao.getByPaytypeOrderByConfigid(paytype.trim());
+ if (!StringUtil.isEmpty(list)) {
+ for (TPaytypeConfig pt : list) {
+ TShopPaytypeConfig spc = shopPaytypeConfigDao.getShopPaytypeConfigById(shopaccno, pt.getPaytype(), pt.getConfigid());
+ if (null == spc) {
+ spc = new TShopPaytypeConfig();
+ spc.setShopaccno(shopaccno);
+ spc.setPaytype(pt.getPaytype());
+ spc.setConfigid(pt.getConfigid());
+ spc.setConfigName(pt.getConfigName());
+ spc.setConfigValue(null);
+ }
+ result.add(spc);
+ }
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public boolean saveOrUpdateShopPaytypeConfig(String shopaccno, String paytype, Map<String, String> param) throws WebCheckException {
+ TShopPaytype shopPaytype = getShopPaytype(shopaccno, paytype);
+ if (null == shopPaytype) {
+ throw new WebCheckException("此商户[" + shopaccno + "]还不具有该支付能力[" + paytype + "]");
+ }
+ for (String key : param.keySet()) {
+ String value = param.get(key);
+ TShopPaytypeConfig spc = shopPaytypeConfigDao.getShopPaytypeConfigById(shopPaytype.getShopaccno(), shopPaytype.getPaytype(), key);
+ if (null != spc) {
+ spc.setConfigValue(StringUtil.isEmpty(value) ? null : value.trim());
+ } else {
+ spc = new TShopPaytypeConfig();
+ spc.setShopaccno(shopPaytype.getShopaccno());
+ spc.setPaytype(shopPaytype.getPaytype());
+ spc.setConfigid(key);
+ spc.setConfigValue(StringUtil.isEmpty(value) ? null : value.trim());
+ TPaytypeConfig paytypeConfig = paytypeConfigDao.getByPaytypeAndAndConfigid(shopPaytype.getPaytype(), key);
+ if (null != paytypeConfig) {
+ spc.setConfigName(paytypeConfig.getConfigName());
+ }
+ }
+ shopPaytypeConfigDao.save(spc);
+ }
+ return true;
+ }
}
<div class="layui-card-body">
<div class="layui-form toolbar">
搜索:
- <input id="search-paraname" class="layui-input search-input" type="text" maxlength="40" style="width: 300px;"
+ <input id="search-business-paraname" class="layui-input search-input" type="text" maxlength="40" style="width: 300px;"
placeholder="输入参数名查询"/> 
- <button id="btn-search" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
+ <button id="search-business-search" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
</button>
- <button id="btn-add" class="layui-btn icon-btn" data-type="add"><i class="layui-icon"></i>新 增</button>
- <button id="btn-reset" class="layui-btn layui-btn-primary" data-type="reset"><i class="layui-icon"></i>清 空</button>
+ <button id="search-business-add" class="layui-btn icon-btn" data-type="add"><i class="layui-icon"></i>新 增</button>
+ <button id="search-business-reset" class="layui-btn layui-btn-primary" data-type="reset"><i class="layui-icon"></i>清 空</button>
</div>
<table class="layui-table" id="businessparaTable" lay-filter="businessparaTable-filter"></table>
</div>
]
});
// 搜索按钮点击事件
- $('#btn-search').click(function () {
- var paraname = $("#search-paraname").val();
+ $('#search-business-search').click(function () {
+ var paraname = $("#search-business-paraname").val();
table.reload('businessparaTable', {where: {paraname: paraname}, page: {curr: 1}});
});
- $('#btn-add').click(function () {
+ $('#search-business-add').click(function () {
admin.popupCenter({
title: "新增业务参数",
area:["600px","300px"],
});
});
- $('#btn-reset').click(function () {
- $("#search-paraname").val("");
+ $('#search-business-reset').click(function () {
+ $("#search-business-paraname").val("");
});
//监听单元格
<div class="layui-card-body">
<div class="layui-form toolbar">
搜索:
- <input id="search-paytype" class="layui-input search-input" type="text" maxlength="40" style="width: 300px;"
+ <input id="search-global-paytype" class="layui-input search-input" type="text" maxlength="40" style="width: 300px;"
placeholder="输入支付方式查询"/>
<button id="btn-search-param" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
</button>
});
// 搜索按钮点击事件
$('#btn-search-param').click(function () {
- var paytype = $("#search-paytype").val();
+ var paytype = $("#search-global-paytype").val();
table.reload('paytypeTable', {where: {paytype: paytype}, page: {curr: 1}});
});
});
$('#btn-reset-param').click(function () {
- $("#search-paytypeTable").val("");
+ $("#search-global-paytype").val("");
});
// 修改总状态
<label class="layui-form-label" style="float: right;width: 100%;" th:text="${config.configid}">参数名</label>
</div>
<div class="layui-input-block" style="margin:0;display: inline;float: right;width: 80%;">
- <input type="text" th:name="${config.configid}" class="layui-input" th:value="${config.configValue}"/>
+ <input type="text" th:name="${config.configid}" class="layui-input" th:value="${config.configValue}" autocomplete="off"/>
</div>
</div>
<div class="layui-card-body">
<div class="layui-form toolbar">
搜索:
- <input id="search-paraid" class="layui-input search-input" maxlength="9" type="text" placeholder="输入参数ID"/> 
- <input id="search-paraname" class="layui-input search-input" type="text" maxlength="30" placeholder="输入参数名称"/> 
+ <input id="search-syspara-paraid" class="layui-input search-input" maxlength="9" type="text" placeholder="输入参数ID"/> 
+ <input id="search-syspara-paraname" class="layui-input search-input" type="text" maxlength="30" placeholder="输入参数名称"/> 
<button id="btn-search-sysparam" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
</button>
<button id="btn-reset-sysparam" class="layui-btn layui-btn-primary" data-type="reset"><i class="layui-icon"></i>清 空</button>
});
// 搜索按钮点击事件
$('#btn-search-sysparam').click(function () {
- var paraid = $("#search-paraid").val();
- var paraname = $("#search-paraname").val();
+ var paraid = $("#search-syspara-paraid").val();
+ var paraname = $("#search-syspara-paraname").val();
if (null != paraid && paraid.length > 0 && !(/^\d+$/.test(paraid))) {
layer.msg("参数ID请输入数字", {icon: 2});
}else{
});
$('#btn-reset-sysparam').click(function () {
- $("#search-paraid").val("");
- $("#search-paraname").val("");
+ $("#search-syspara-paraid").val("");
+ $("#search-syspara-paraname").val("");
});
<div class="layui-col-xs5 layui-col-md3">
<div class="layui-card">
<div class="layui-card-header">
- 商户树<span style="font-size: 12px;">(双击末级商户查询)</span>
+ 商户树<span style="font-size: 12px;">(双击结算商户查询)</span>
</div>
<div class="layui-card-body layui-show"
style="background-color: #D7F9F7;max-height: 560px;overflow:auto;">
Content-type: text/html
Supwisdom Source - epayment/food_payapi.git/commitdiff
500 - Internal Server Error
Unknown encoding 'gb18030' at /usr/local/share/gitweb/gitweb.cgi line 1539