系统-账户管理-客户账户-新增时加入客户类型下拉选择

dev
wuwenxiong 2021-09-16 16:11:37 +08:00
parent d5dcd9c38b
commit 2d75d376d5
4 changed files with 14 additions and 14 deletions

View File

@ -41,9 +41,9 @@ public class SysuserController extends Controller {
Integer del = getInt("del", Const.LOGIC_DEL_VALID); // 默认显示未删除的
Integer type = getInt("type");
Integer entity_id = getInt("entity_id");
Integer customer_type = getInt("customer_type");
Integer customer_type_id = getInt("customer_type_id");
String customer_name = get("customer_name");
renderJson(Result.object(SysuserSyncService.me.find(pp, name, phone, del, type, entity_id, customer_type, customer_name)));
renderJson(Result.object(SysuserSyncService.me.find(pp, name, phone, del, type, entity_id, customer_type_id, customer_name)));
}
/**

View File

@ -295,7 +295,7 @@ public class SysuserSyncService extends BaseService {
return sysuser;
}
public Page<Record> find(PageParam pp, String name, String phone, Integer del, Integer type, Integer entity_id, Integer customer_type, String customer_name) {
public Page<Record> find(PageParam pp, String name, String phone, Integer del, Integer type, Integer entity_id, Integer customer_type_id, String customer_name) {
List<Object> paraList = new ArrayList<>();
StringBuilder sqlbuf = new StringBuilder();
sqlbuf.append(" from (\n");
@ -319,7 +319,7 @@ public class SysuserSyncService extends BaseService {
sqlbuf.setLength(0);
sqlbuf.append(" from ( \n");
sqlbuf.append(" select \n");
sqlbuf.append(" u.id, u.phone, u.name, u.type, u.del, u.entity_id, c.name customer_name, c.texpayer_name, c.invoice_type, t.id customer_type, t.name customer_type_name \n");
sqlbuf.append(" u.id, u.phone, u.name, u.type, u.del, u.entity_id, c.name customer_name, c.texpayer_name, c.invoice_type, t.id customer_type_id, t.name customer_type_name \n");
sqlbuf.append(" from sysuser u \n");
sqlbuf.append(" left join customer c on u.entity_id = c.id\n");
sqlbuf.append(" left join customer_type t on c.customer_type_id = t.id\n");
@ -330,9 +330,9 @@ public class SysuserSyncService extends BaseService {
paraList.add("%" + customer_name.trim() + "%");
}
if (customer_type != null && customer_type >= 0) {
sqlbuf.append(" and a.customer_type = ? \n");
paraList.add(customer_type);
if (customer_type_id != null && customer_type_id >= 0) {
sqlbuf.append(" and a.customer_type_id = ? \n");
paraList.add(customer_type_id);
}
}

View File

@ -153,9 +153,9 @@ public class SysuserController extends Controller {
Integer del = getInt("del", Const.LOGIC_DEL_VALID); // 默认显示未删除的
Integer type = getInt("type");
Integer entity_id = getInt("entity_id");
Integer customer_type = getInt("customer_type");
Integer customer_type_id = getInt("customer_type_id");
String customer_name = get("customer_name");
renderJson(Result.object(SysuserSyncService.me.find(pp, name, phone, del, type, entity_id, customer_type, customer_name)));
renderJson(Result.object(SysuserSyncService.me.find(pp, name, phone, del, type, entity_id, customer_type_id, customer_name)));
}
/**

View File

@ -817,7 +817,7 @@ public class SysuserSyncService extends BaseSyncService {
return sysuser;
}
public Page<Record> find(PageParam pp, String name, String phone, Integer del, Integer type, Integer entity_id, Integer customer_type, String customer_name) {
public Page<Record> find(PageParam pp, String name, String phone, Integer del, Integer type, Integer entity_id, Integer customer_type_id, String customer_name) {
List<Object> paraList = new ArrayList<>();
StringBuilder sqlbuf = new StringBuilder();
@ -842,7 +842,7 @@ public class SysuserSyncService extends BaseSyncService {
sqlbuf.setLength(0);
sqlbuf.append(" from ( \n");
sqlbuf.append(" select \n");
sqlbuf.append(" u.id, u.phone, u.name, u.type, u.del, u.entity_id, c.name customer_name, c.texpayer_name, c.invoice_type, t.id customer_type, t.name customer_type_name \n");
sqlbuf.append(" u.id, u.phone, u.name, u.type, u.del, u.entity_id, c.name customer_name, c.texpayer_name, c.invoice_type, t.id customer_type_id, t.name customer_type_name \n");
sqlbuf.append(" from sysuser u \n");
sqlbuf.append(" left join customer c on u.entity_id = c.id\n");
sqlbuf.append(" left join customer_type t on c.customer_type_id = t.id\n");
@ -853,9 +853,9 @@ public class SysuserSyncService extends BaseSyncService {
paraList.add("%" + customer_name.trim() + "%");
}
if (customer_type != null && customer_type >= 0) {
sqlbuf.append(" and a.customer_type = ? \n");
paraList.add(customer_type);
if (customer_type_id != null && customer_type_id >= 0) {
sqlbuf.append(" and a.customer_type_id = ? \n");
paraList.add(customer_type_id);
}
}