修改查询语句
This commit is contained in:
parent
f81731d15a
commit
94c60348cb
|
|
@ -88,6 +88,19 @@ public class NuConfigSuppliersApplyController extends JeecgController<NuConfigSu
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="供应商入驻申请-分页列表查询", notes="供应商入驻申请-分页列表查询")
|
||||||
|
@GetMapping(value = "/listPage")
|
||||||
|
public Result<IPage<NuConfigSuppliersApply>> listPage(NuConfigSuppliersApply nuConfigSuppliersApply,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<NuConfigSuppliersApply> queryWrapper = QueryGenerator.initQueryWrapper(nuConfigSuppliersApply, req.getParameterMap());
|
||||||
|
Page<NuConfigSuppliersApply> page = new Page<NuConfigSuppliersApply>(pageNo, pageSize);
|
||||||
|
IPage<NuConfigSuppliersApply> pageList = nuConfigSuppliersApplyService.listPage(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,11 @@ package com.nu.modules.configSuppliersApply.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import net.sf.jsqlparser.expression.operators.arithmetic.Concat;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply;
|
import com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
@ -14,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
*/
|
*/
|
||||||
public interface NuConfigSuppliersApplyMapper extends BaseMapper<NuConfigSuppliersApply> {
|
public interface NuConfigSuppliersApplyMapper extends BaseMapper<NuConfigSuppliersApply> {
|
||||||
|
|
||||||
|
IPage<NuConfigSuppliersApply> listPage(Page<NuConfigSuppliersApply> page, @Param(Constants.WRAPPER) QueryWrapper<NuConfigSuppliersApply> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,57 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nu.modules.configSuppliersApply.mapper.NuConfigSuppliersApplyMapper">
|
<mapper namespace="com.nu.modules.configSuppliersApply.mapper.NuConfigSuppliersApplyMapper">
|
||||||
|
|
||||||
|
<select id="listPage" resultType="com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply">
|
||||||
|
SELECT sup.* FROM (
|
||||||
|
SELECT
|
||||||
|
IFNULL(b.id, a.id) AS id,
|
||||||
|
a.suppliers_name,
|
||||||
|
a.suppliers_nature,
|
||||||
|
a.suppliers_address,
|
||||||
|
a.person_in_charge,
|
||||||
|
a.contact_number,
|
||||||
|
a.supply_state,
|
||||||
|
a.opening_bank,
|
||||||
|
a.opening_bank_no,
|
||||||
|
a.wechart_id,
|
||||||
|
a.img_path,
|
||||||
|
a.create_by,
|
||||||
|
a.create_time,
|
||||||
|
a.sys_org_code,
|
||||||
|
a.source_type,
|
||||||
|
'1' AS type,
|
||||||
|
'2' AS apply_status,
|
||||||
|
a.id AS suppliers_id
|
||||||
|
FROM nu_config_suppliers_info a
|
||||||
|
LEFT JOIN nu_config_suppliers_apply b ON a.id = b.suppliers_id AND b.iz_history = 'N'
|
||||||
|
WHERE a.del_flag = '0' AND a.iz_enabled = 'Y'
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
b.id AS id,
|
||||||
|
b.suppliers_name,
|
||||||
|
b.suppliers_nature,
|
||||||
|
b.suppliers_address,
|
||||||
|
b.person_in_charge,
|
||||||
|
b.contact_number,
|
||||||
|
b.supply_state,
|
||||||
|
b.opening_bank,
|
||||||
|
b.opening_bank_no,
|
||||||
|
b.wechart_id,
|
||||||
|
b.img_path,
|
||||||
|
b.create_by,
|
||||||
|
b.create_time,
|
||||||
|
b.sys_org_code,
|
||||||
|
b.source_type,
|
||||||
|
'2' AS type,
|
||||||
|
b.apply_status AS apply_status,
|
||||||
|
b.suppliers_id AS suppliers_id
|
||||||
|
FROM nu_config_suppliers_apply b
|
||||||
|
WHERE b.suppliers_id NOT IN (SELECT id FROM nu_config_suppliers_info)
|
||||||
|
AND b.opt_type = '入驻'
|
||||||
|
AND b.iz_history = 'N'
|
||||||
|
) sup
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.nu.modules.configSuppliersApply.service;
|
package com.nu.modules.configSuppliersApply.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply;
|
import com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
|
@ -17,4 +20,6 @@ public interface INuConfigSuppliersApplyService extends IService<NuConfigSupplie
|
||||||
List<Map<String, Object>> getModifyInfo(NuConfigSuppliersApply suppliersApply);
|
List<Map<String, Object>> getModifyInfo(NuConfigSuppliersApply suppliersApply);
|
||||||
|
|
||||||
String audit(NuConfigSuppliersApply nuConfigSuppliersApply);
|
String audit(NuConfigSuppliersApply nuConfigSuppliersApply);
|
||||||
|
|
||||||
|
IPage<NuConfigSuppliersApply> listPage(Page<NuConfigSuppliersApply> page, QueryWrapper<NuConfigSuppliersApply> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.nu.modules.configSuppliersApply.service.impl;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply;
|
import com.nu.modules.configSuppliersApply.entity.NuConfigSuppliersApply;
|
||||||
import com.nu.modules.configSuppliersApply.mapper.NuConfigSuppliersApplyMapper;
|
import com.nu.modules.configSuppliersApply.mapper.NuConfigSuppliersApplyMapper;
|
||||||
import com.nu.modules.configSuppliersApply.service.INuConfigSuppliersApplyService;
|
import com.nu.modules.configSuppliersApply.service.INuConfigSuppliersApplyService;
|
||||||
|
|
@ -145,4 +147,9 @@ public class NuConfigSuppliersApplyServiceImpl extends ServiceImpl<NuConfigSuppl
|
||||||
|
|
||||||
return one.getSysOrgCode();
|
return one.getSysOrgCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<NuConfigSuppliersApply> listPage(Page<NuConfigSuppliersApply> page, QueryWrapper<NuConfigSuppliersApply> queryWrapper) {
|
||||||
|
return baseMapper.listPage(page, queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue