|
@@ -6,12 +6,13 @@ import com.minpay.common.format.IFormatService;
|
|
|
import com.minpay.common.service.ILogService;
|
|
import com.minpay.common.service.ILogService;
|
|
|
import com.minpay.common.service.IPublicService;
|
|
import com.minpay.common.service.IPublicService;
|
|
|
import com.minpay.common.util.DateUtil;
|
|
import com.minpay.common.util.DateUtil;
|
|
|
-import com.minpay.db.table.mapper.ImUserMapper;
|
|
|
|
|
import com.minpay.db.table.mapper.VmAccountMapper;
|
|
import com.minpay.db.table.mapper.VmAccountMapper;
|
|
|
-import com.minpay.db.table.model.ImUser;
|
|
|
|
|
|
|
+import com.minpay.db.table.mapper.VmHlAccountMapper;
|
|
|
import com.minpay.db.table.model.VmAccount;
|
|
import com.minpay.db.table.model.VmAccount;
|
|
|
import com.minpay.db.table.model.VmAccountExample;
|
|
import com.minpay.db.table.model.VmAccountExample;
|
|
|
-import com.minpay.db.table.own.mapper.BusinessNumMapper;
|
|
|
|
|
|
|
+import com.minpay.db.table.model.VmHlAccount;
|
|
|
|
|
+import com.minpay.db.table.model.VmHlAccountExample;
|
|
|
|
|
+import com.mysql.jdbc.StringUtils;
|
|
|
import com.startup.minpay.frame.business.IMINAction;
|
|
import com.startup.minpay.frame.business.IMINAction;
|
|
|
import com.startup.minpay.frame.business.res.MINActionResult;
|
|
import com.startup.minpay.frame.business.res.MINActionResult;
|
|
|
import com.startup.minpay.frame.constant.IMINBusinessConstant;
|
|
import com.startup.minpay.frame.constant.IMINBusinessConstant;
|
|
@@ -26,9 +27,7 @@ import com.startup.minpay.frame.target.MINAction;
|
|
|
import com.startup.minpay.frame.target.MINComponent;
|
|
import com.startup.minpay.frame.target.MINComponent;
|
|
|
import com.startup.minpay.frame.target.MINParam;
|
|
import com.startup.minpay.frame.target.MINParam;
|
|
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 收款商户号管理
|
|
* 收款商户号管理
|
|
@@ -78,17 +77,21 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
// 查询当前角色编号
|
|
// 查询当前角色编号
|
|
|
User u = session.getUser();
|
|
User u = session.getUser();
|
|
|
String imUserId = u.getId();
|
|
String imUserId = u.getId();
|
|
|
- ImUser user = Service.lookup(IMINDataBaseService.class).getMybatisMapper(ImUserMapper.class)
|
|
|
|
|
- .selectByPrimaryKey(imUserId);
|
|
|
|
|
-
|
|
|
|
|
- Map<String, String> params = new HashMap<String, String>();
|
|
|
|
|
- params.put("accountName", accountName);
|
|
|
|
|
- params.put("accountId", accountId);
|
|
|
|
|
- params.put("type", type);
|
|
|
|
|
-
|
|
|
|
|
MINRowBounds rows = new MINRowBounds(page, limit);
|
|
MINRowBounds rows = new MINRowBounds(page, limit);
|
|
|
- List<Map<String, Object>> businessNumList = Service.lookup(IMINDataBaseService.class)
|
|
|
|
|
- .getMybatisMapper(BusinessNumMapper.class).querybusinessNum(params, rows);
|
|
|
|
|
|
|
+ VmHlAccountExample vmHlAccountExample = new VmHlAccountExample();
|
|
|
|
|
+ VmHlAccountExample.Criteria createCriteria = vmHlAccountExample.createCriteria();
|
|
|
|
|
+ if(!StringUtils.isNullOrEmpty(accountName)){
|
|
|
|
|
+ createCriteria.andNameLike("%"+accountName+"%");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!StringUtils.isNullOrEmpty(accountId)){
|
|
|
|
|
+ createCriteria.andUsridEqualTo(accountId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(!StringUtils.isNullOrEmpty(type)){
|
|
|
|
|
+ createCriteria.andTypeEqualTo(type);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<VmHlAccount> businessNumList = Service.lookup(IMINDataBaseService.class)
|
|
|
|
|
+ .getMybatisMapper(VmHlAccountMapper.class).selectByExample(vmHlAccountExample,rows);
|
|
|
|
|
+
|
|
|
businessNumList = new MINCopyFormat("{type:'typeDesc'}").format(businessNumList);
|
|
businessNumList = new MINCopyFormat("{type:'typeDesc'}").format(businessNumList);
|
|
|
businessNumList = Service.lookup(IFormatService.class).formatEnum(businessNumList, "{typeDesc:'BUSINESSNUM_TYPE'}");
|
|
businessNumList = Service.lookup(IFormatService.class).formatEnum(businessNumList, "{typeDesc:'BUSINESSNUM_TYPE'}");
|
|
|
businessNumList = Service.lookup(IFormatService.class).formatDateTime(businessNumList, "createTime");
|
|
businessNumList = Service.lookup(IFormatService.class).formatDateTime(businessNumList, "createTime");
|
|
@@ -135,7 +138,7 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
|
|
|
|
|
// 获取商品主键
|
|
// 获取商品主键
|
|
|
String id = Service.lookup(IPublicService.class).getSequence("VM_ACT_ID");
|
|
String id = Service.lookup(IPublicService.class).getSequence("VM_ACT_ID");
|
|
|
- VmAccount vti = new VmAccount();
|
|
|
|
|
|
|
+ VmHlAccount vti = new VmHlAccount();
|
|
|
vti.setId(id); // 账户ID
|
|
vti.setId(id); // 账户ID
|
|
|
vti.setName(name); // 账户名称
|
|
vti.setName(name); // 账户名称
|
|
|
vti.setUsrid(accountId); // 存储机构编号
|
|
vti.setUsrid(accountId); // 存储机构编号
|
|
@@ -146,10 +149,9 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
vti.setCreateTime(nowTime); // 创建时间
|
|
vti.setCreateTime(nowTime); // 创建时间
|
|
|
vti.setModifyUser(user.getId()); // 修改人
|
|
vti.setModifyUser(user.getId()); // 修改人
|
|
|
vti.setModifyTime(nowTime); // 修改时间
|
|
vti.setModifyTime(nowTime); // 修改时间
|
|
|
- vti.setIsbranch("1");
|
|
|
|
|
// 新增收款商户号信息,执行插入数据
|
|
// 新增收款商户号信息,执行插入数据
|
|
|
Service.lookup(IMINDataBaseService.class)
|
|
Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmAccountMapper.class)
|
|
|
|
|
|
|
+ .getMybatisMapper(VmHlAccountMapper.class)
|
|
|
.insertSelective(vti);
|
|
.insertSelective(vti);
|
|
|
// 记录操作日志
|
|
// 记录操作日志
|
|
|
String logInfo = "操作员:" + user.getName() + "添加收款商户号,收款商户号编号:" + accountId;
|
|
String logInfo = "操作员:" + user.getName() + "添加收款商户号,收款商户号编号:" + accountId;
|
|
@@ -181,7 +183,7 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
User user = session.getUser();
|
|
User user = session.getUser();
|
|
|
//获取当前时间
|
|
//获取当前时间
|
|
|
String dateTime = com.min.util.DateUtil.getCurrentDateTimeString();
|
|
String dateTime = com.min.util.DateUtil.getCurrentDateTimeString();
|
|
|
- VmAccount vti = new VmAccount();
|
|
|
|
|
|
|
+ VmHlAccount vti = new VmHlAccount();
|
|
|
vti.setId(id); // 账户ID
|
|
vti.setId(id); // 账户ID
|
|
|
vti.setName(accountName); // 账户名称
|
|
vti.setName(accountName); // 账户名称
|
|
|
vti.setType(accountType); // 账户类型
|
|
vti.setType(accountType); // 账户类型
|
|
@@ -192,7 +194,7 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
|
|
|
|
|
//执行修改
|
|
//执行修改
|
|
|
Service.lookup(IMINDataBaseService.class)
|
|
Service.lookup(IMINDataBaseService.class)
|
|
|
- .getMybatisMapper(VmAccountMapper.class)
|
|
|
|
|
|
|
+ .getMybatisMapper(VmHlAccountMapper.class)
|
|
|
.updateByPrimaryKeySelective(vti);
|
|
.updateByPrimaryKeySelective(vti);
|
|
|
//记录日志信息
|
|
//记录日志信息
|
|
|
String logInfo = "操作员:"+user.getName() +"修改收款商户号,名称:"+ accountName +",编号: "+ id;
|
|
String logInfo = "操作员:"+user.getName() +"修改收款商户号,名称:"+ accountName +",编号: "+ id;
|
|
@@ -213,11 +215,11 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
MINSession session
|
|
MINSession session
|
|
|
) throws MINBusinessException {
|
|
) throws MINBusinessException {
|
|
|
MINActionResult res = new MINActionResult();
|
|
MINActionResult res = new MINActionResult();
|
|
|
- VmAccount ta = new VmAccount();
|
|
|
|
|
|
|
+ VmHlAccount ta = new VmHlAccount();
|
|
|
ta.setState("01"); //删除
|
|
ta.setState("01"); //删除
|
|
|
ta.setId(id);
|
|
ta.setId(id);
|
|
|
//更新数据
|
|
//更新数据
|
|
|
- Service.lookup(IMINDataBaseService.class).updateByPrimaryKeySelective(VmAccountMapper.class, ta);
|
|
|
|
|
|
|
+ Service.lookup(IMINDataBaseService.class).updateByPrimaryKeySelective(VmHlAccountMapper.class, ta);
|
|
|
Service.lookup(ILogService.class).logging(session, "删除收款商户号id:" + id);
|
|
Service.lookup(ILogService.class).logging(session, "删除收款商户号id:" + id);
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|
|
@@ -232,14 +234,14 @@ public class BusinessNumManageAction implements IMINAction {
|
|
|
@MINAction(value = QUERY_TENCENT)
|
|
@MINAction(value = QUERY_TENCENT)
|
|
|
public MINActionResult queryTencent(MINSession session) throws MINBusinessException {
|
|
public MINActionResult queryTencent(MINSession session) throws MINBusinessException {
|
|
|
MINActionResult res = new MINActionResult();
|
|
MINActionResult res = new MINActionResult();
|
|
|
- VmAccountExample example = new VmAccountExample();
|
|
|
|
|
- VmAccountExample.Criteria criteria = example.createCriteria();
|
|
|
|
|
|
|
+ VmHlAccountExample example = new VmHlAccountExample();
|
|
|
|
|
+ VmHlAccountExample.Criteria criteria = example.createCriteria();
|
|
|
User user = session.getUser();
|
|
User user = session.getUser();
|
|
|
criteria.andStateNotEqualTo("00");
|
|
criteria.andStateNotEqualTo("00");
|
|
|
if(!user.getBranchId().equals(Constant.DEFAULT_INSTITUTIONS)){
|
|
if(!user.getBranchId().equals(Constant.DEFAULT_INSTITUTIONS)){
|
|
|
criteria.andIdEqualTo(user.getBranchId());
|
|
criteria.andIdEqualTo(user.getBranchId());
|
|
|
}
|
|
}
|
|
|
- List<VmAccount> ls = Service.lookup(IMINDataBaseService.class).selectByExample(VmAccountMapper.class, example);
|
|
|
|
|
|
|
+ List<VmHlAccount> ls = Service.lookup(IMINDataBaseService.class).selectByExample(VmHlAccountMapper.class, example);
|
|
|
res.set(IMINBusinessConstant.F_QUERY_RESULT, ls);
|
|
res.set(IMINBusinessConstant.F_QUERY_RESULT, ls);
|
|
|
return res;
|
|
return res;
|
|
|
}
|
|
}
|