|
@@ -0,0 +1,60 @@
|
|
|
+package com.minpay.shouhuo.orderaction;
|
|
|
+
|
|
|
+import com.minpay.common.bean.User;
|
|
|
+import com.minpay.common.format.IFormatService;
|
|
|
+import com.minpay.db.table.mapper.VmRechargeRuleMapper;
|
|
|
+import com.minpay.db.table.model.VmRechargeRule;
|
|
|
+import com.minpay.db.table.model.VmRechargeRuleExample;
|
|
|
+import com.mysql.cj.util.StringUtils;
|
|
|
+import com.startup.minpay.frame.business.IMINAction;
|
|
|
+import com.startup.minpay.frame.business.MINHttpServletRequestContext;
|
|
|
+import com.startup.minpay.frame.business.res.MINActionResult;
|
|
|
+import com.startup.minpay.frame.constant.IMINBusinessConstant;
|
|
|
+import com.startup.minpay.frame.exception.MINBusinessException;
|
|
|
+import com.startup.minpay.frame.jdbc.MINRowBounds;
|
|
|
+import com.startup.minpay.frame.service.base.IMINDataBaseService;
|
|
|
+import com.startup.minpay.frame.service.base.Service;
|
|
|
+import com.startup.minpay.frame.session.MINSession;
|
|
|
+import com.startup.minpay.frame.target.MINAction;
|
|
|
+import com.startup.minpay.frame.target.MINComponent;
|
|
|
+import com.startup.minpay.frame.target.MINParam;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 充值规则管理
|
|
|
+ * @author xbh
|
|
|
+ *
|
|
|
+ */
|
|
|
+@MINComponent
|
|
|
+public class RechargeManageAction implements IMINAction {
|
|
|
+ public final static String QUERY_RECHARGE_RULE = "queryRechargeRule";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询充值规则
|
|
|
+ * @param session
|
|
|
+ * @param fapRequest
|
|
|
+ * @return
|
|
|
+ * @throws MINBusinessException
|
|
|
+ */
|
|
|
+ @MINAction(value = QUERY_RECHARGE_RULE)
|
|
|
+ public MINActionResult queryRechargeRule(
|
|
|
+ MINSession session,
|
|
|
+ MINHttpServletRequestContext fapRequest
|
|
|
+ ) throws MINBusinessException {
|
|
|
+ MINActionResult res = new MINActionResult();
|
|
|
+ User user = session.getUser();
|
|
|
+ String branchId = user.getBranchId();
|
|
|
+ VmRechargeRuleExample vmRechargeRuleExample = new VmRechargeRuleExample();
|
|
|
+ VmRechargeRuleExample.Criteria createCriteria = vmRechargeRuleExample.createCriteria();
|
|
|
+ createCriteria.andBranchEqualTo(branchId);
|
|
|
+ // 查询
|
|
|
+ List<VmRechargeRule> ls = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmRechargeRuleMapper.class).selectByExample(vmRechargeRuleExample);
|
|
|
+ // 格式化
|
|
|
+ ls = Service.lookup(IFormatService.class).formatDateTime(ls, "createTime");
|
|
|
+ // 设置返回值
|
|
|
+ res.set(IMINBusinessConstant.F_PAGING_LAY, ls);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|