| @@ -15,6 +15,8 @@ import com.iformall.domain.po.WxUserDataRule; | |||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.enums.EnumBillAllType; | import com.iformall.enums.EnumBillAllType; | ||||
| import com.iformall.enums.EnumCUserBaseInfoSex; | import com.iformall.enums.EnumCUserBaseInfoSex; | ||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import com.iformall.enums.EnumShopSellStatus; | |||||
| import com.iformall.enums.EnumShopUsersPersonRelax; | import com.iformall.enums.EnumShopUsersPersonRelax; | ||||
| import com.iformall.enums.EnumShopUsersPrincipalType; | import com.iformall.enums.EnumShopUsersPrincipalType; | ||||
| import com.iformall.enums.EnumShopUsersStatus; | import com.iformall.enums.EnumShopUsersStatus; | ||||
| @@ -81,6 +83,14 @@ public class WxShopController extends BaseController { | |||||
| wxShop.setSortColumn("shop_number asc"); | wxShop.setSortColumn("shop_number asc"); | ||||
| //wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | //wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | ||||
| setDataRule(wxShop); | setDataRule(wxShop); | ||||
| //查询自持的商业店铺 | |||||
| if (null != wxShop.getIsOwnMerchantShop()) { | |||||
| List<Integer> typeList = new ArrayList<Integer>(); | |||||
| typeList.add(EnumRentShopType.SHOP.getCode()); | |||||
| typeList.add(EnumRentShopType.POINT.getCode()); | |||||
| wxShop.setTypeList(typeList); | |||||
| wxShop.setSellStatus(EnumShopSellStatus.OWNED.getCode()); | |||||
| } | |||||
| final PageInfo<Map<String, Object>> page = wxShopService.listMapAsPage(wxShop, pageNum, pageSize); | final PageInfo<Map<String, Object>> page = wxShopService.listMapAsPage(wxShop, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -275,7 +275,13 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| WxMerchant merchant = wxMerchantService.selectById(merchantId); | WxMerchant merchant = wxMerchantService.selectById(merchantId); | ||||
| if (merchant.getIsPrivate() == EnumYesOrNo.YES.getCode()) { | if (merchant.getIsPrivate() == EnumYesOrNo.YES.getCode()) { | ||||
| shopList = new ArrayList<Long>(); | shopList = new ArrayList<Long>(); | ||||
| shopList.add(Long.parseLong(merchant.getCreateFromId())); | |||||
| //不从这取,因为这是存的第一次创建时店铺的编号,这个店铺有可能被删除重新创建 | |||||
| //shopList.add(Long.parseLong(merchant.getCreateFromId())); | |||||
| String shopNumber = merchant.getCreateFromData(); | |||||
| WxShop shop = wxShopService.getShopByShopNumber(merchant, shopNumber); | |||||
| if (null != shop) { | |||||
| shopList.add(shop.getId()); | |||||
| } | |||||
| }else { | }else { | ||||
| shopList = wxMerchantService.getMerchantShopIds(merchantId); | shopList = wxMerchantService.getMerchantShopIds(merchantId); | ||||
| } | } | ||||
| @@ -1 +1,4 @@ | |||||
| ALTER TABLE wx_shop ADD COLUMN sell_status INT(1) NOT NULL DEFAULT 1 COMMENT '销售状态'; | |||||
| ALTER TABLE wx_shop ADD COLUMN sell_status INT(1) NOT NULL DEFAULT 1 COMMENT '销售状态'; | |||||
| 更新虚拟商户的铺位为待出租状态。 | |||||
| 删除虚拟商户的关联铺位。 | |||||
| @@ -191,5 +191,10 @@ public class WxShop extends TenantEntity { | |||||
| this.rent_unit = rentUnit; | this.rent_unit = rentUnit; | ||||
| } | } | ||||
| @TableField(exist = false) | |||||
| private Integer isOwnMerchantShop; | |||||
| @TableField(exist = false) | |||||
| private List<Integer> typeList; | |||||
| @TableField(exist = false) | |||||
| private String queryShopNumber; | |||||
| } | } | ||||
| @@ -285,6 +285,10 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| Integer type = (Integer)shop.get("type"); | |||||
| if (null != type ) { | |||||
| shop.put("typeName", EnumRentShopType.getEnum(type).getMessage()); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -848,7 +852,7 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| public WxShop getShopByShopNumber(TenantEntity tenantEntity,String shopNumber) { | public WxShop getShopByShopNumber(TenantEntity tenantEntity,String shopNumber) { | ||||
| WxShop shopQ = new WxShop(); | WxShop shopQ = new WxShop(); | ||||
| shopQ.updateTenantInfo(tenantEntity); | shopQ.updateTenantInfo(tenantEntity); | ||||
| shopQ.setShopNumber(shopNumber); | |||||
| shopQ.setQueryShopNumber(shopNumber); | |||||
| List<WxShop> shopList = wxShopMapper.findList(shopQ); | List<WxShop> shopList = wxShopMapper.findList(shopQ); | ||||
| if (null != shopList && shopList.size() > 0 ) { | if (null != shopList && shopList.size() > 0 ) { | ||||
| return shopList.get(0); | return shopList.get(0); | ||||
| @@ -60,6 +60,10 @@ | |||||
| <if test=" null != shopNumber and ''!=shopNumber"> | <if test=" null != shopNumber and ''!=shopNumber"> | ||||
| and `shop_number` like concat('%', #{shopNumber},'%') | and `shop_number` like concat('%', #{shopNumber},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != queryShopNumber and ''!=queryShopNumber"> | |||||
| and `shop_number` = #{queryShopNumber} | |||||
| </if> | |||||
| <if test=" null != buildArea "> | <if test=" null != buildArea "> | ||||
| and `build_area` like concat('%', #{buildArea},'%') | and `build_area` like concat('%', #{buildArea},'%') | ||||
| @@ -142,6 +146,13 @@ | |||||
| <if test=" null != shopTypeForRule and '' != shopTypeForRule "> | <if test=" null != shopTypeForRule and '' != shopTypeForRule "> | ||||
| and type in (${shopTypeForRule}) | and type in (${shopTypeForRule}) | ||||
| </if> | </if> | ||||
| <if test=" null != typeList "> | |||||
| and type in | |||||
| <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | |||||
| #{tidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| @@ -235,6 +246,10 @@ | |||||
| <if test=" null != shopNumber and ''!=shopNumber"> | <if test=" null != shopNumber and ''!=shopNumber"> | ||||
| and s.`shop_number` like concat('%', #{shopNumber},'%') | and s.`shop_number` like concat('%', #{shopNumber},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != queryShopNumber and ''!=queryShopNumber"> | |||||
| and s.`shop_number` = #{queryShopNumber} | |||||
| </if> | |||||
| <if test=" null != buildArea "> | <if test=" null != buildArea "> | ||||
| and s.`build_area` like concat('%', #{buildArea},'%') | and s.`build_area` like concat('%', #{buildArea},'%') | ||||
| @@ -298,6 +313,13 @@ | |||||
| <if test=" null != businessForRule and '' != businessForRule "> | <if test=" null != businessForRule and '' != businessForRule "> | ||||
| and s.`business_id` in (${businessForRule}) | and s.`business_id` in (${businessForRule}) | ||||
| </if> | </if> | ||||
| <if test=" null != typeList "> | |||||
| and s.type in | |||||
| <foreach collection="typeList" index="index" item="tidItem" open="(" separator="," close=")"> | |||||
| #{tidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and s.id in | and s.id in | ||||
| @@ -330,9 +352,19 @@ | |||||
| <if test=" null != shopNumber and ''!=shopNumber"> | <if test=" null != shopNumber and ''!=shopNumber"> | ||||
| and s.`shop_number` like concat('%', #{shopNumber},'%') | and s.`shop_number` like concat('%', #{shopNumber},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != queryShopNumber and ''!=queryShopNumber"> | |||||
| and s.`shop_number` = #{queryShopNumber} | |||||
| </if> | |||||
| <if test=" null != status"> | <if test=" null != status"> | ||||
| and s.`status` = #{status} | and s.`status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != sellStatus "> | |||||
| and s.`sell_status` = #{sellStatus} | |||||
| </if> | |||||
| <if test=" null != type "> | <if test=" null != type "> | ||||
| and s.`type` = #{type} | and s.`type` = #{type} | ||||
| </if> | </if> | ||||
| @@ -382,6 +414,10 @@ | |||||
| <if test=" null != shopNumber and ''!=shopNumber"> | <if test=" null != shopNumber and ''!=shopNumber"> | ||||
| and s.`shop_number` like concat('%', #{shopNumber},'%') | and s.`shop_number` like concat('%', #{shopNumber},'%') | ||||
| </if> | </if> | ||||
| <if test=" null != queryShopNumber and ''!=queryShopNumber"> | |||||
| and s.`shop_number` = #{queryShopNumber} | |||||
| </if> | |||||
| <if test=" null != buildArea "> | <if test=" null != buildArea "> | ||||
| and s.`build_area` like concat('%', #{buildArea},'%') | and s.`build_area` like concat('%', #{buildArea},'%') | ||||
| @@ -402,6 +438,10 @@ | |||||
| <if test=" null != status"> | <if test=" null != status"> | ||||
| and s.`status` = #{status} | and s.`status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != sellStatus "> | |||||
| and s.`sell_status` = #{sellStatus} | |||||
| </if> | |||||
| <if test=" null != x "> | <if test=" null != x "> | ||||
| and s.`x` = #{x} | and s.`x` = #{x} | ||||