| @@ -12,6 +12,9 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| */ | */ | ||||
| @@ -65,5 +68,12 @@ public class WxBrandController extends BaseController { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxBrandService.getById(id)); | return new ResultData(Result.SUCCESS, "查询成功", wxBrandService.getById(id)); | ||||
| } | } | ||||
| @GetMapping("/queryBrand") | |||||
| public ResultData queryBrand() { | |||||
| List<Map<String,Object>> brandList = wxBrandService.queryBrand(getTenantId()); | |||||
| return new ResultData(brandList); | |||||
| } | |||||
| } | } | ||||
| @@ -50,9 +50,19 @@ public class WxPropertyContract implements Serializable { | |||||
| public void setShopNumber(String shopNumber) { | public void setShopNumber(String shopNumber) { | ||||
| this.shopNumber = shopNumber; | this.shopNumber = shopNumber; | ||||
| } | } | ||||
| /*商户**/ | |||||
| @Transient | |||||
| private String brandName; | |||||
| public String getBrandName() { | |||||
| return brandName; | |||||
| } | |||||
| public void setBrandName(String brandName) { | |||||
| this.brandName = brandName; | |||||
| } | |||||
| /*商户**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| /*月租金/分成(分)**/ | /*月租金/分成(分)**/ | ||||
| @@ -96,7 +106,7 @@ public class WxPropertyContract implements Serializable { | |||||
| private String merchantName; | private String merchantName; | ||||
| /*经营品牌**/ | /*经营品牌**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="经营品牌",name="brand") | @io.swagger.annotations.ApiModelProperty(value="经营品牌",name="brand") | ||||
| private String brand; | |||||
| private Long brand; | |||||
| /*经营业态ID:参照wx_business表**/ | /*经营业态ID:参照wx_business表**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="经营业态ID:参照wx_business表",name="businessId") | @io.swagger.annotations.ApiModelProperty(value="经营业态ID:参照wx_business表",name="businessId") | ||||
| private Integer businessId; | private Integer businessId; | ||||
| @@ -224,10 +234,10 @@ public class WxPropertyContract implements Serializable { | |||||
| public void setMerchantName(String _merchantName) { | public void setMerchantName(String _merchantName) { | ||||
| merchantName = _merchantName; | merchantName = _merchantName; | ||||
| } | } | ||||
| public String getBrand() { | |||||
| public Long getBrand() { | |||||
| return brand; | return brand; | ||||
| } | } | ||||
| public void setBrand(String _brand) { | |||||
| public void setBrand(Long _brand) { | |||||
| brand = _brand; | brand = _brand; | ||||
| } | } | ||||
| public Integer getBusinessId() { | public Integer getBusinessId() { | ||||
| @@ -52,6 +52,9 @@ public class WxRentContract implements Serializable { | |||||
| @Transient | @Transient | ||||
| private String floor; | private String floor; | ||||
| @Transient | |||||
| private String brandName; | |||||
| public String getBuilding() { | public String getBuilding() { | ||||
| return building; | return building; | ||||
| } | } | ||||
| @@ -121,7 +124,7 @@ public class WxRentContract implements Serializable { | |||||
| private String merchantName; | private String merchantName; | ||||
| /*经营品牌**/ | /*经营品牌**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value = "经营品牌", name = "brand") | @io.swagger.annotations.ApiModelProperty(value = "经营品牌", name = "brand") | ||||
| private String brand; | |||||
| private Long brand; | |||||
| /*经常业态ID**/ | /*经常业态ID**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value = "经常业态ID", name = "businessId") | @io.swagger.annotations.ApiModelProperty(value = "经常业态ID", name = "businessId") | ||||
| private Integer businessId; | private Integer businessId; | ||||
| @@ -289,11 +292,11 @@ public class WxRentContract implements Serializable { | |||||
| merchantName = _merchantName; | merchantName = _merchantName; | ||||
| } | } | ||||
| public String getBrand() { | |||||
| public Long getBrand() { | |||||
| return brand; | return brand; | ||||
| } | } | ||||
| public void setBrand(String _brand) { | |||||
| public void setBrand(Long _brand) { | |||||
| brand = _brand; | brand = _brand; | ||||
| } | } | ||||
| @@ -5,6 +5,7 @@ import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxBrand; | import com.iformall.domain.po.WxBrand; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -12,10 +13,8 @@ import java.util.List; | |||||
| public interface WxBrandMapper extends CommonMapper<WxBrand, String> { | public interface WxBrandMapper extends CommonMapper<WxBrand, String> { | ||||
| List<WxBrand> findList(WxBrand wxBrand); | List<WxBrand> findList(WxBrand wxBrand); | ||||
| List<Map<String,Object>> queryBrand(String tenantId); | |||||
| } | } | ||||
| @@ -4,6 +4,9 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxBrand; | import com.iformall.domain.po.WxBrand; | ||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| */ | */ | ||||
| @@ -39,4 +42,5 @@ public interface WxBrandService { | |||||
| ResultData update(WxBrand wxBrand); | ResultData update(WxBrand wxBrand); | ||||
| List<Map<String,Object>> queryBrand(String id); | |||||
| } | } | ||||
| @@ -17,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -52,6 +54,9 @@ public class WxBrandServiceImpl implements WxBrandService { | |||||
| try { | try { | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| wxBrand.setId(idWorker.nextId()); | wxBrand.setId(idWorker.nextId()); | ||||
| Date date = new Date(); | |||||
| wxBrand.setCreatetime(date); | |||||
| wxBrand.setUpdatetime(date); | |||||
| wxBrandMapper.insertSelective(wxBrand); | wxBrandMapper.insertSelective(wxBrand); | ||||
| return new ResultData(Result.SUCCESS, "操作成功"); | return new ResultData(Result.SUCCESS, "操作成功"); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| @@ -75,5 +80,10 @@ public class WxBrandServiceImpl implements WxBrandService { | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public List<Map<String,Object>> queryBrand(String tenantId) { | |||||
| return wxBrandMapper.queryBrand(tenantId); | |||||
| } | |||||
| } | } | ||||
| @@ -34,7 +34,9 @@ | |||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="queryBrand" resultType="hashmap"> | |||||
| select id,`name` value from wx_brand where tenant_id=#{value} | |||||
| </select> | |||||
| @@ -96,11 +96,12 @@ | |||||
| rentalEndDate,rc.`status`,rc.price,rc.contract_number contractNumber,s.shop_number shopNumber, | rentalEndDate,rc.`status`,rc.price,rc.contract_number contractNumber,s.shop_number shopNumber, | ||||
| f.floor_name floorName,b.building_name buildingName,receive_period receivePeriod, | f.floor_name floorName,b.building_name buildingName,receive_period receivePeriod, | ||||
| rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate, | rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate, | ||||
| start_date startDate,end_date endDate,rc.rent_contract_id rentContractId | |||||
| start_date startDate,end_date endDate,rc.rent_contract_id rentContractId,b.`name` brandName | |||||
| from wx_property_contract rc | from wx_property_contract rc | ||||
| left join wx_shop s on rc.shop_id=s.id | left join wx_shop s on rc.shop_id=s.id | ||||
| left join wx_mall_floor f on s.floor=f.id | left join wx_mall_floor f on s.floor=f.id | ||||
| left join wx_mall_building b on s.building=b.id | left join wx_mall_building b on s.building=b.id | ||||
| left join wx_brand b on rc.brand=b.id | |||||
| <where> | <where> | ||||
| <if test=" null != tenantId ">rc.tenant_id=#{tenantId}</if> | <if test=" null != tenantId ">rc.tenant_id=#{tenantId}</if> | ||||
| @@ -99,11 +99,12 @@ | |||||
| select rc.id,rc.merchant_name merchantName,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.`status`, | select rc.id,rc.merchant_name merchantName,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.`status`, | ||||
| rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName, | rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName, | ||||
| rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type, | rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type, | ||||
| rc.start_date startDate,rc.end_date endDate | |||||
| rc.start_date startDate,rc.end_date endDate,b.`name` brandName | |||||
| from wx_rent_contract rc | from wx_rent_contract rc | ||||
| left join wx_shop s on rc.shop_id=s.id | left join wx_shop s on rc.shop_id=s.id | ||||
| left join wx_mall_floor f on s.floor=f.id | left join wx_mall_floor f on s.floor=f.id | ||||
| left join wx_mall_building b on s.building=b.id | left join wx_mall_building b on s.building=b.id | ||||
| left join wx_brand b on rc.brand=b.id | |||||
| <where> | <where> | ||||
| rc.tenant_id=#{tenantId} | rc.tenant_id=#{tenantId} | ||||
| <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like concat('%',#{merchantName},'%')</if> | <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like concat('%',#{merchantName},'%')</if> | ||||