| @@ -58,6 +58,23 @@ public class WxMerchantController extends BaseController { | |||||
| } | } | ||||
| @UserDataRuleAnnotation("merchant_list") | |||||
| @ApiOperation("分页列表接口") | |||||
| @GetMapping("listVo2") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| @SystemControllerLog(description = "商户-列表") | |||||
| public ResultData listVo2(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::list"); | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage2(wxMerchant, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @ApiOperation("分页列表接口") | @ApiOperation("分页列表接口") | ||||
| @GetMapping("list") | @GetMapping("list") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -34,4 +34,6 @@ public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> { | |||||
| List<WxMerchantTradeDetailVo> userTradeDetailList(WxMerchant wxMerchant); | List<WxMerchantTradeDetailVo> userTradeDetailList(WxMerchant wxMerchant); | ||||
| WxMerchant findByTrade(HashMap<String, String> params); | WxMerchant findByTrade(HashMap<String, String> params); | ||||
| List<WxMerchant> findListVo2(WxMerchant record); | |||||
| } | } | ||||
| @@ -143,4 +143,6 @@ public interface WxMerchantService { | |||||
| List<WxMerchantVo> findMerchantVoList(Map paramMap); | List<WxMerchantVo> findMerchantVoList(Map paramMap); | ||||
| PageInfo<WxMerchant> listVoAsPage2(WxMerchant wxMerchant, Integer pageNum, Integer pageSize); | |||||
| } | } | ||||
| @@ -795,4 +795,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| public List<WxMerchantVo> findMerchantVoList(Map paramMap) { | public List<WxMerchantVo> findMerchantVoList(Map paramMap) { | ||||
| return wxCouponMerchantMapper.findMerchantVoList(paramMap); | return wxCouponMerchantMapper.findMerchantVoList(paramMap); | ||||
| } | } | ||||
| @Override | |||||
| public PageInfo<WxMerchant> listVoAsPage2(WxMerchant record, Integer pageIndex, Integer pageSize) { | |||||
| PageHelper.startPage(pageIndex, pageSize); | |||||
| List<WxMerchant> merchants = wxMerchantMapper.findListVo2(record); | |||||
| PageInfo<WxMerchant> pageInfo = new PageInfo<>(merchants); | |||||
| return pageInfo; | |||||
| } | |||||
| } | } | ||||
| @@ -193,6 +193,29 @@ | |||||
| <include refid="dynamicWhereConditionsVo"/> | <include refid="dynamicWhereConditionsVo"/> | ||||
| </select> | </select> | ||||
| <select id="findListVo2" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap"> | |||||
| select * from wx_merchant | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != name and ''!=name "> | |||||
| and `name` like concat('%', #{name},'%') | |||||
| </if> | |||||
| <if test=" null != linkPhone and ''!=linkPhone "> | |||||
| and `link_phone` like concat('%', #{linkPhone},'%') | |||||
| </if> | |||||
| <if test=" null != businessId "> | |||||
| and `business_id` = #{businessId} | |||||
| </if> | |||||
| <if test=" null != status "> | |||||
| and `status` = #{status} | |||||
| </if> | |||||
| </select> | |||||
| <sql id="dataRule"> | <sql id="dataRule"> | ||||
| <if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)"> | <if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)"> | ||||