| @@ -8,6 +8,7 @@ import com.iformall.domain.po.WxLevelConfig; | |||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxProfitSharingReceiver; | import com.iformall.domain.po.WxProfitSharingReceiver; | ||||
| import com.iformall.domain.vo.WxMerchantSimpleVo; | import com.iformall.domain.vo.WxMerchantSimpleVo; | ||||
| import com.iformall.domain.vo.WxMerchantVo; | |||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import com.iformall.service.WxProfitSharingReceiverService; | import com.iformall.service.WxProfitSharingReceiverService; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -164,4 +165,14 @@ public class WxMerchantController extends BaseController { | |||||
| return new ResultData(wxMerchantService.findList(getTenantId())); | return new ResultData(wxMerchantService.findList(getTenantId())); | ||||
| } | } | ||||
| @ApiOperation("根据id查询接口") | |||||
| @GetMapping("/findMerchantById") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| @SystemControllerLog(description = "商户-查询") | |||||
| public ResultData findMerchantById(Long id) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::findMerchantById"); | |||||
| WxMerchantVo wxMerchant = wxMerchantService.findMerchantById(id); | |||||
| return new ResultData(wxMerchant); | |||||
| } | |||||
| } | } | ||||
| @@ -69,7 +69,30 @@ public class WxMerchantVo { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "品牌图", name = "brandImg") | @io.swagger.annotations.ApiModelProperty(value = "品牌图", name = "brandImg") | ||||
| private String brandImg; | private String brandImg; | ||||
| public String getBrandName() { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店面类型", name = "shopType") | |||||
| private Integer shopType; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "业态名称", name = "businessName") | |||||
| private String businessName; | |||||
| public Integer getShopType() { | |||||
| return shopType; | |||||
| } | |||||
| public void setShopType(Integer shopType) { | |||||
| this.shopType = shopType; | |||||
| } | |||||
| public String getBusinessName() { | |||||
| return businessName; | |||||
| } | |||||
| public void setBusinessName(String businessName) { | |||||
| this.businessName = businessName; | |||||
| } | |||||
| public String getBrandName() { | |||||
| return brandName; | return brandName; | ||||
| } | } | ||||
| @@ -79,4 +79,7 @@ public interface WxMerchantService { | |||||
| ResultData updateMerchantTax(WxMerchant wxMerchant); | ResultData updateMerchantTax(WxMerchant wxMerchant); | ||||
| ResultData updateMerchantLevel(WxMerchant wxMerchant); | ResultData updateMerchantLevel(WxMerchant wxMerchant); | ||||
| WxMerchantVo findMerchantById(Long id); | |||||
| } | } | ||||
| @@ -551,4 +551,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "操作成功"); | return new ResultData(Result.SUCCESS, "操作成功"); | ||||
| } | } | ||||
| @Override | |||||
| public WxMerchantVo findMerchantById(Long id) { | |||||
| WxMerchantVo merchant = new WxMerchantVo(); | |||||
| merchant.setId(id); | |||||
| List<WxMerchantVo> listCVo = wxMerchantMapper.findListCVo(merchant); | |||||
| return listCVo.isEmpty() ? new WxMerchantVo() : listCVo.get(0); | |||||
| } | |||||
| } | } | ||||
| @@ -119,9 +119,9 @@ | |||||
| </select> | </select> | ||||
| <sql id="allMerchantVoColumns"> | <sql id="allMerchantVoColumns"> | ||||
| m.id, | |||||
| m.img_url,m.name,m.link_phone,m.status,m.business_id,m.sub_business_id, | |||||
| m.is_public,m.email,m.title,m.cover_picture,b.name as brand_name,b.logo as brand_img | |||||
| m.id,m.img_url,m.name,m.link_phone,m.status,m.business_id,m.sub_business_id, | |||||
| m.is_public,m.email,m.title,m.cover_picture,b.name as brand_name,b.logo as brand_img, | |||||
| m.shop_type,bu.title as business_name | |||||
| </sql> | </sql> | ||||
| <select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> | <select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> | ||||
| @@ -130,6 +130,7 @@ | |||||
| FROM wx_merchant m | FROM wx_merchant m | ||||
| left join wx_merchant_shop ms on ms.merchant_id = m.id | left join wx_merchant_shop ms on ms.merchant_id = m.id | ||||
| left join wx_brand b on b.id = m.brand | left join wx_brand b on b.id = m.brand | ||||
| left join wx_business bu on b.id = m.business_id | |||||
| where ms.is_del = 0 | where ms.is_del = 0 | ||||
| <where> | <where> | ||||
| <if test=" null != tenantId "> | <if test=" null != tenantId "> | ||||
| @@ -156,10 +157,13 @@ | |||||
| <result column="email" jdbcType="VARCHAR" property="email"/> | <result column="email" jdbcType="VARCHAR" property="email"/> | ||||
| <result column="title" jdbcType="VARCHAR" property="title"/> | <result column="title" jdbcType="VARCHAR" property="title"/> | ||||
| <result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/> | <result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/> | ||||
| <result column="shop_type" jdbcType="VARCHAR" property="shopType"/> | |||||
| <result column="brand_name" jdbcType="VARCHAR" property="brandName"/> | <result column="brand_name" jdbcType="VARCHAR" property="brandName"/> | ||||
| <result column="brand_img" jdbcType="VARCHAR" property="brandImg"/> | <result column="brand_img" jdbcType="VARCHAR" property="brandImg"/> | ||||
| <result column="business_name" jdbcType="VARCHAR" property="businessName"/> | |||||
| <collection column="{merchantId=id}" property="shopVoList" | <collection column="{merchantId=id}" property="shopVoList" | ||||
| ofType="com.iformall.domain.vo.WxShopVo" | ofType="com.iformall.domain.vo.WxShopVo" | ||||
| javaType="java.util.List" | javaType="java.util.List" | ||||
| @@ -174,6 +178,7 @@ | |||||
| FROM wx_merchant m | FROM wx_merchant m | ||||
| left join wx_merchant_shop ms on ms.merchant_id = m.id | left join wx_merchant_shop ms on ms.merchant_id = m.id | ||||
| left join wx_brand b on b.id = m.brand | left join wx_brand b on b.id = m.brand | ||||
| left join wx_business bu on b.id = m.business_id | |||||
| where ms.is_del = 0 | where ms.is_del = 0 | ||||
| <if test=" null != merchantName and ''!=merchantName "> | <if test=" null != merchantName and ''!=merchantName "> | ||||
| and m.`name` like concat('%', #{merchantName},'%') | and m.`name` like concat('%', #{merchantName},'%') | ||||
| @@ -198,7 +203,10 @@ | |||||
| <if test=" null != isPublic"> | <if test=" null != isPublic"> | ||||
| and m.`is_public` = #{isPublic} | and m.`is_public` = #{isPublic} | ||||
| </if> | </if> | ||||
| <if test=" null != id"> | |||||
| and m.`id` = #{id} | |||||
| </if> | |||||
| </select> | </select> | ||||