Search in sources :

Example 1 with PayConfigExample

use of com.itrus.portal.db.PayConfigExample in project portal by ixinportal.

the class PayExtraBillWebController method getPayConfig.

private PayConfig getPayConfig(String appId) {
    PayConfigExample pce = new PayConfigExample();
    PayConfigExample.Criteria pcc = pce.createCriteria();
    pcc.andAppIdEqualTo(appId);
    return sqlSession.selectOne("com.itrus.portal.db.PayConfigMapper.selectByExample", pce);
}
Also used : PayConfigExample(com.itrus.portal.db.PayConfigExample)

Example 2 with PayConfigExample

use of com.itrus.portal.db.PayConfigExample in project portal by ixinportal.

the class TransferController method list.

@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "message", required = false) Integer message, @RequestParam(value = "status", required = false) Integer status, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, @RequestParam(value = "page2", required = false) Integer page2, @RequestParam(value = "size2", required = false) Integer size2, Model uiModel) throws Exception {
    // page,size
    if (page == null || page < 1)
        page = 1;
    if (size == null || size < 1)
        size = 10;
    // count,pages
    Integer count = sqlSession.selectOne("com.itrus.portal.db.TransferMapper.countByExample", null);
    uiModel.addAttribute("count", count);
    uiModel.addAttribute("pages", (count + size - 1) / size);
    // page, size
    if (page > 1 && size * (page - 1) >= count) {
        page = (count + size - 1) / size;
    }
    uiModel.addAttribute("page", page);
    uiModel.addAttribute("size", size);
    // query data
    Integer offset = size * (page - 1);
    TransferExample transferex = new TransferExample();
    // projectex.or().andIdIsNotNull();
    transferex.setOffset(offset);
    transferex.setLimit(size);
    List transferall = sqlSession.selectList("com.itrus.portal.db.TransferMapper.selectByExample", transferex);
    uiModel.addAttribute("transfers", transferall);
    // itemcount
    uiModel.addAttribute("itemcount", transferall.size());
    uiModel.addAttribute("message", message == null ? "" : "要删除的发票存在关联,无法删除");
    // page,size
    if (page2 == null || page2 < 1)
        page2 = 1;
    if (size2 == null || size2 < 1)
        size2 = 10;
    // count,pages
    Integer count2 = sqlSession.selectOne("com.itrus.portal.db.OnlinePayMapper.countByExample", null);
    uiModel.addAttribute("count2", count2);
    uiModel.addAttribute("pages2", (count2 + size2 - 1) / size2);
    // page, size
    if (page2 > 1 && size2 * (page2 - 1) >= count2) {
        page2 = (count2 + size2 - 1) / size;
    }
    uiModel.addAttribute("page2", page2);
    uiModel.addAttribute("size2", size2);
    // query data
    Integer offset2 = size2 * (page2 - 1);
    OnlinePayExample onlinepayex = new OnlinePayExample();
    // projectex.or().andIdIsNotNull();
    onlinepayex.setOffset(offset2);
    onlinepayex.setLimit(size2);
    List onlinepayexall = sqlSession.selectList("com.itrus.portal.db.OnlinePayMapper.selectOnlinePays", onlinepayex);
    uiModel.addAttribute("onlinepays", onlinepayexall);
    PayConfigExample payconfigex = new PayConfigExample();
    Map<Long, PayConfig> payconfigmap = sqlSession.selectMap("com.itrus.portal.db.PayConfigMapper.selectByExample", payconfigex, "id");
    uiModel.addAttribute("payconfigmap", payconfigmap);
    // itemcount
    uiModel.addAttribute("itemcount", onlinepayexall.size());
    uiModel.addAttribute("message", message == null ? "" : "要删除的发票存在关联,无法删除");
    uiModel.addAttribute("status", status);
    return "transfer/list";
}
Also used : TransferExample(com.itrus.portal.db.TransferExample) PayConfig(com.itrus.portal.db.PayConfig) OnlinePayExample(com.itrus.portal.db.OnlinePayExample) List(java.util.List) PayConfigExample(com.itrus.portal.db.PayConfigExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 3 with PayConfigExample

use of com.itrus.portal.db.PayConfigExample in project portal by ixinportal.

the class TransferController method showzxzf.

// 显示在线支付详情
@RequestMapping(value = "/zxzf/{id}", produces = "text/html")
public String showzxzf(@PathVariable("id") Long id, Model uiModel) {
    OnlinePay onlinepay = sqlSession.selectOne("com.itrus.portal.db.OnlinePayMapper.selectByPrimaryKey", id);
    PayConfigExample payconfigex = new PayConfigExample();
    Map<Long, PayConfig> payconfigmap = sqlSession.selectMap("com.itrus.portal.db.PayConfigMapper.selectByExample", payconfigex, "id");
    uiModel.addAttribute("payconfigmap", payconfigmap);
    uiModel.addAttribute("onlinepay", onlinepay);
    return "transfer/showzxzf";
}
Also used : PayConfig(com.itrus.portal.db.PayConfig) PayConfigExample(com.itrus.portal.db.PayConfigExample) OnlinePay(com.itrus.portal.db.OnlinePay) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 4 with PayConfigExample

use of com.itrus.portal.db.PayConfigExample in project portal by ixinportal.

the class PayConfigController method list.

// 列表所有信息
@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "message", required = false) Integer message, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) throws Exception {
    // page,size
    if (page == null || page < 1)
        page = 1;
    if (size == null || size < 1)
        size = 10;
    // count,pages
    Integer count = sqlSession.selectOne("com.itrus.portal.db.PayConfigMapper.countByExample", null);
    uiModel.addAttribute("count", count);
    uiModel.addAttribute("pages", (count + size - 1) / size);
    // page, size
    if (page > 1 && size * (page - 1) >= count) {
        page = (count + size - 1) / size;
    }
    uiModel.addAttribute("page", page);
    uiModel.addAttribute("size", size);
    // query data
    Integer offset = size * (page - 1);
    PayConfigExample payconfigex = new PayConfigExample();
    // projectex.or().andIdIsNotNull();
    payconfigex.setOffset(offset);
    payconfigex.setLimit(size);
    List<PayConfig> payconfigexall = sqlSession.selectList("com.itrus.portal.db.PayConfigMapper.selectByExample", payconfigex);
    uiModel.addAttribute("payconfigs", payconfigexall);
    // itemcount
    uiModel.addAttribute("itemcount", payconfigexall.size());
    uiModel.addAttribute("message", message == null ? "" : "要删除的支付配置存在关联,无法删除");
    return "payconfig/list";
}
Also used : PayConfig(com.itrus.portal.db.PayConfig) PayConfigExample(com.itrus.portal.db.PayConfigExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 5 with PayConfigExample

use of com.itrus.portal.db.PayConfigExample in project portal by ixinportal.

the class ClientPayWebController method getPayConfig.

private PayConfig getPayConfig(String appId) {
    PayConfigExample pce = new PayConfigExample();
    PayConfigExample.Criteria pcc = pce.createCriteria();
    pcc.andAppIdEqualTo(appId);
    return sqlSession.selectOne("com.itrus.portal.db.PayConfigMapper.selectByExample", pce);
}
Also used : PayConfigExample(com.itrus.portal.db.PayConfigExample)

Aggregations

PayConfigExample (com.itrus.portal.db.PayConfigExample)6 PayConfig (com.itrus.portal.db.PayConfig)4 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 OnlinePay (com.itrus.portal.db.OnlinePay)2 OnlinePayExample (com.itrus.portal.db.OnlinePayExample)2 Bill (com.itrus.portal.db.Bill)1 BillExample (com.itrus.portal.db.BillExample)1 OnPayInfo (com.itrus.portal.db.OnPayInfo)1 TransferExample (com.itrus.portal.db.TransferExample)1 Date (java.util.Date)1 List (java.util.List)1