| @@ -9,8 +9,9 @@ import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.WxShopUsersPerson; | import com.iformall.domain.po.WxShopUsersPerson; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxUserDataRule; | 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; | ||||
| @@ -365,24 +366,24 @@ public class WxShopController extends BaseController { | |||||
| @ApiOperation("查询店铺当前的用户信息") | @ApiOperation("查询店铺当前的用户信息") | ||||
| @GetMapping("currentShopUsers") | @GetMapping("currentShopUsers") | ||||
| public ResultData currentShopUsers(@ModelAttribute WxShopUsers wxShopUsers) { | |||||
| if (null == wxShopUsers){ | |||||
| wxShopUsers = new WxShopUsers(); | |||||
| public ResultData currentShopUsers(@ModelAttribute WxShopUsers wxShopUsersShop) { | |||||
| if (null == wxShopUsersShop){ | |||||
| wxShopUsersShop = new WxShopUsers(); | |||||
| } | } | ||||
| if (null == wxShopUsers.getShopId()) { | |||||
| if (null == wxShopUsersShop.getShopId()) { | |||||
| return new ResultData(Result.ERROR,"shopId参数不能为空"); | return new ResultData(Result.ERROR,"shopId参数不能为空"); | ||||
| } | } | ||||
| if (null == wxShopUsers.getType()) { | |||||
| if (null == wxShopUsersShop.getType()) { | |||||
| return new ResultData(Result.ERROR,"type参数不能为空"); | return new ResultData(Result.ERROR,"type参数不能为空"); | ||||
| } | } | ||||
| wxShopUsers.updateTenantInfo(getTenantInfo()); | |||||
| wxShopUsers.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| return new ResultData(wxShopService.getOneShopUsers(wxShopUsers)); | |||||
| wxShopUsersShop.updateTenantInfo(getTenantInfo()); | |||||
| wxShopUsersShop.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| return new ResultData(wxShopService.getOneShopUsers(wxShopUsersShop)); | |||||
| } | } | ||||
| @ApiOperation("更新店铺用户") | @ApiOperation("更新店铺用户") | ||||
| @PostMapping("saveShopUsers") | @PostMapping("saveShopUsers") | ||||
| public ResultData saveShopUsers(@RequestBody WxShopUsers wxShopUsers) { | |||||
| public ResultData saveShopUsers(@RequestBody WxShopUsersInfo wxShopUsers) { | |||||
| wxShopUsers.updateTenantInfo(getTenantInfo()); | wxShopUsers.updateTenantInfo(getTenantInfo()); | ||||
| wxShopService.saveOrUpdateShopUsers(wxShopUsers); | wxShopService.saveOrUpdateShopUsers(wxShopUsers); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| @@ -390,7 +391,7 @@ public class WxShopController extends BaseController { | |||||
| @ApiOperation("更新店铺用户") | @ApiOperation("更新店铺用户") | ||||
| @PostMapping("changeShopUsers") | @PostMapping("changeShopUsers") | ||||
| public ResultData changeShopUsers(@RequestBody WxShopUsers wxShopUsers) { | |||||
| public ResultData changeShopUsers(@RequestBody WxShopUsersInfo wxShopUsers) { | |||||
| wxShopUsers.updateTenantInfo(getTenantInfo()); | wxShopUsers.updateTenantInfo(getTenantInfo()); | ||||
| wxShopUsers.setStatus(EnumShopUsersStatus.OLD.getCode()); | wxShopUsers.setStatus(EnumShopUsersStatus.OLD.getCode()); | ||||
| wxShopService.saveOrUpdateShopUsers(wxShopUsers); | wxShopService.saveOrUpdateShopUsers(wxShopUsers); | ||||
| @@ -399,7 +400,7 @@ public class WxShopController extends BaseController { | |||||
| @ApiOperation("删除店铺用户") | @ApiOperation("删除店铺用户") | ||||
| @PostMapping("deleteShopUsers") | @PostMapping("deleteShopUsers") | ||||
| public ResultData deleteShopUsers(@RequestBody WxShopUsers wxShopUsers) { | |||||
| public ResultData deleteShopUsers(@RequestBody WxShopUsersInfo wxShopUsers) { | |||||
| wxShopUsers.updateTenantInfo(getTenantInfo()); | wxShopUsers.updateTenantInfo(getTenantInfo()); | ||||
| wxShopUsers.setStatus(EnumShopUsersStatus.OLD.getCode()); | wxShopUsers.setStatus(EnumShopUsersStatus.OLD.getCode()); | ||||
| wxShopService.saveOrUpdateShopUsers(wxShopUsers); | wxShopService.saveOrUpdateShopUsers(wxShopUsers); | ||||
| @@ -411,13 +412,13 @@ public class WxShopController extends BaseController { | |||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| public ResultData shopUsersList(@ModelAttribute WxShopUsers wxShopUsers, Integer pageNum, Integer pageSize) { | |||||
| public ResultData shopUsersList(@ModelAttribute WxShopUsersInfo wxShopUsers, Integer pageNum, Integer pageSize) { | |||||
| if (null == wxShopUsers){ | if (null == wxShopUsers){ | ||||
| wxShopUsers = new WxShopUsers(); | |||||
| wxShopUsers = new WxShopUsersInfo(); | |||||
| } | } | ||||
| wxShopUsers.updateTenantInfo(getTenantInfo()); | wxShopUsers.updateTenantInfo(getTenantInfo()); | ||||
| wxShopUsers.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | wxShopUsers.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | ||||
| final PageInfo<WxShopUsers> page = wxShopService.shopUsersListAsPage(wxShopUsers, pageNum, pageSize); | |||||
| final PageInfo<WxShopUsersInfo> page = wxShopService.shopUsersListAsPage(wxShopUsers, pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -20,7 +20,7 @@ import com.iformall.domain.po.WxEnergyFees; | |||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxPayAccountBill; | import com.iformall.domain.po.WxPayAccountBill; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.WxUserDataRule; | import com.iformall.domain.po.WxUserDataRule; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.vo.WxBillBad; | import com.iformall.domain.vo.WxBillBad; | ||||
| @@ -160,10 +160,10 @@ public class WxAllBillController extends BillBaseController { | |||||
| if (null != shopPage && null != shopPage.getList() && shopPage.getList().size() > 0 ) { | if (null != shopPage && null != shopPage.getList() && shopPage.getList().size() > 0 ) { | ||||
| Map<Long, String> floorMap = wxMallFloorService.getFloorMap(wxShop); | Map<Long, String> floorMap = wxMallFloorService.getFloorMap(wxShop); | ||||
| Map<Long, String> buildingMap = wxMallBuildingService.getBuildingMap(wxShop); | Map<Long, String> buildingMap = wxMallBuildingService.getBuildingMap(wxShop); | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(wxShop); | suq.updateTenantInfo(wxShop); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| Map<Long, WxShopUsers> suMap = wxShopSerivce.getShopUserMap(suq); | |||||
| Map<Long, WxShopUsersInfo> suMap = wxShopSerivce.getShopUserMap(suq); | |||||
| List<WxShopBillVo> retList = new ArrayList<WxShopBillVo>(); | List<WxShopBillVo> retList = new ArrayList<WxShopBillVo>(); | ||||
| for (int i = 0 ; i < shopPage.getList().size(); i ++) { | for (int i = 0 ; i < shopPage.getList().size(); i ++) { | ||||
| WxShopBillVo vo = new WxShopBillVo(); | WxShopBillVo vo = new WxShopBillVo(); | ||||
| @@ -183,7 +183,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| vo.setShopNumber(s.getShopNumber()); | vo.setShopNumber(s.getShopNumber()); | ||||
| if (null != suMap) { | if (null != suMap) { | ||||
| WxShopUsers su = suMap.get(s.getId()); | |||||
| WxShopUsersInfo su = suMap.get(s.getId()); | |||||
| if (null != su ) { | if (null != su ) { | ||||
| vo.setCusName(su.getName()); | vo.setCusName(su.getName()); | ||||
| vo.setCusPerson(su.getLinkPerson()); | vo.setCusPerson(su.getLinkPerson()); | ||||
| @@ -696,7 +696,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| wxShop.setNeedPayNoDays(EnumYesOrNo.YES.getCode()); | wxShop.setNeedPayNoDays(EnumYesOrNo.YES.getCode()); | ||||
| WxShop shop = wxShopSerivce.getById(wxShop.getId()); | WxShop shop = wxShopSerivce.getById(wxShop.getId()); | ||||
| WxShopUsers shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); | |||||
| WxShopUsersInfo shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); | |||||
| List<WxAllBill> list = billAllHelper.getMerchantBillList(wxShop); | List<WxAllBill> list = billAllHelper.getMerchantBillList(wxShop); | ||||
| if (null != list && list.size() > 0 ) { | if (null != list && list.size() > 0 ) { | ||||
| @@ -746,7 +746,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| } | } | ||||
| List<WxAllBill> list = billAllHelper.getMerchantBillList(wxShop); | List<WxAllBill> list = billAllHelper.getMerchantBillList(wxShop); | ||||
| WxShop shop = wxShopSerivce.getById(wxShop.getId()); | WxShop shop = wxShopSerivce.getById(wxShop.getId()); | ||||
| WxShopUsers shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); | |||||
| WxShopUsersInfo shopUser = wxShopSerivce.getCurrentShopUser(shop, shop.getId()); | |||||
| if (null != list && list.size() > 0 ) { | if (null != list && list.size() > 0 ) { | ||||
| WxEnergyFees fq = new WxEnergyFees(); | WxEnergyFees fq = new WxEnergyFees(); | ||||
| fq.updateTenantInfo(shop); | fq.updateTenantInfo(shop); | ||||
| @@ -51,6 +51,9 @@ alter table wx_shop_users change shop_id create_shop_id bigint(20) not null; | |||||
| alter table wx_shop_users drop column status; | alter table wx_shop_users drop column status; | ||||
| alter table wx_shop_users drop column begin_date; | alter table wx_shop_users drop column begin_date; | ||||
| alter table wx_shop_users drop column end_date; | alter table wx_shop_users drop column end_date; | ||||
| alter table wx_shop_users drop column type; | |||||
| alter table wx_shop_users rename wx_shop_users_info; | |||||
| CREATE TABLE `wx_shop_users_shop` ( | CREATE TABLE `wx_shop_users_shop` ( | ||||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | `id` bigint(20) NOT NULL COMMENT '主键ID', | ||||
| @@ -63,6 +66,7 @@ CREATE TABLE `wx_shop_users_shop` ( | |||||
| `update_date` datetime NOT NULL COMMENT '更新时间', | `update_date` datetime NOT NULL COMMENT '更新时间', | ||||
| `status` int(1) NOT NULL DEFAULT '0' COMMENT '状态', | `status` int(1) NOT NULL DEFAULT '0' COMMENT '状态', | ||||
| `shop_user_id` bigint(20) NOT NULL, | `shop_user_id` bigint(20) NOT NULL, | ||||
| `type` int(1) NOT NULL DEFAULT '2' COMMENT '类型', | |||||
| PRIMARY KEY (`id`), | PRIMARY KEY (`id`), | ||||
| UNIQUE KEY `id_UNIQUE` (`id`), | UNIQUE KEY `id_UNIQUE` (`id`), | ||||
| UNIQUE KEY `UNIQUE_S_U` (`tenant_id`,`shop_id`,`shop_user_id`) | UNIQUE KEY `UNIQUE_S_U` (`tenant_id`,`shop_id`,`shop_user_id`) | ||||
| @@ -16,7 +16,7 @@ import com.iformall.domain.po.WxMerchant; | |||||
| import com.iformall.domain.po.WxMerchantBUser; | import com.iformall.domain.po.WxMerchantBUser; | ||||
| import com.iformall.domain.po.WxPayAccountBill; | import com.iformall.domain.po.WxPayAccountBill; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.WxUserDataRule; | import com.iformall.domain.po.WxUserDataRule; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxBillHotNotify; | import com.iformall.domain.vo.WxBillHotNotify; | ||||
| @@ -115,7 +115,7 @@ public class WxBillController extends BaseController { | |||||
| private WxShop getCurrentShopList() { | private WxShop getCurrentShopList() { | ||||
| WxRentLoginUserDTO user = this.getRentLoginUser(); | WxRentLoginUserDTO user = this.getRentLoginUser(); | ||||
| WxShopUsers su = new WxShopUsers(); | |||||
| WxShopUsersInfo su = new WxShopUsersInfo(); | |||||
| su.updateTenantInfo(user); | su.updateTenantInfo(user); | ||||
| su.setPhone(user.getPhone()); | su.setPhone(user.getPhone()); | ||||
| su.setStatus(EnumShopUsersStatus.LIVE.getCode()); | su.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| @@ -27,8 +27,11 @@ public class WxShopUsers extends TenantEntity { | |||||
| private Long id; | private Long id; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "创建的店铺编号", name = "createShopId") | |||||
| private Long createShopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺编号", name = "shopId") | |||||
| private Long shopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "人员编号", name = "shopUserId") | |||||
| private Long shopUserId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "类型EnumShopUsersType", name = "type") | @io.swagger.annotations.ApiModelProperty(value = "类型EnumShopUsersType", name = "type") | ||||
| private Integer type; | private Integer type; | ||||
| @@ -41,46 +44,30 @@ public class WxShopUsers extends TenantEntity { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value = "主体类型EnumShopUsersPrincipalType", name = "type") | |||||
| private Integer principalType; | |||||
| @TableField(exist = false) | |||||
| private String principalTypeName; | |||||
| public String getPrincipalTypeName() { | |||||
| if (null != principalType) { | |||||
| return EnumShopUsersPrincipalType.getEnum(principalType).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="名称",name="name") | |||||
| private String name; | |||||
| @io.swagger.annotations.ApiModelProperty(value="手机号",name="phone") | |||||
| private String phone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="法人",name="legalPerson") | |||||
| private String legalPerson; | |||||
| @io.swagger.annotations.ApiModelProperty(value="身份证号码",name="idNumber") | |||||
| private String idNumber; | |||||
| @io.swagger.annotations.ApiModelProperty(value="性别EnumCUserBaseInfoSex",name="sex") | |||||
| private Integer sex; | |||||
| @TableField(exist = false) | |||||
| private String sexName; | |||||
| public String getSexName() { | |||||
| if (null != sex) { | |||||
| return EnumCUserBaseInfoSex.getEnum(sex).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="联系人",name="linkPerson") | |||||
| private String linkPerson; | |||||
| @io.swagger.annotations.ApiModelProperty(value="入住日期",name="beginDate") | |||||
| private Date beginDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value="离开日期",name="endDate") | |||||
| private Date endDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @Excel(name="状态",width = 20,orderNum = "7",replace = {"当前_0","往任_1"}) | |||||
| @io.swagger.annotations.ApiModelProperty(value="状态(0:当前, 1:往任)EnumShopUsersStatus",name="status") | |||||
| private Integer status; | |||||
| @TableField(exist = false) | |||||
| private String statusName; | |||||
| public String getStatusName() { | |||||
| if (null != status) { | |||||
| return EnumShopUsersStatus.getEnum(status).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| } | } | ||||
| @@ -0,0 +1,86 @@ | |||||
| package com.iformall.domain.po; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.common.SortColumn; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumCUserBaseInfoSex; | |||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import com.iformall.enums.EnumShopUsersPrincipalType; | |||||
| import com.iformall.enums.EnumShopUsersStatus; | |||||
| import com.iformall.enums.EnumShopUsersType; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| @TableName(value = "wx_shop_users_info") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxShopUsersInfo extends TenantEntity { | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "创建的店铺编号", name = "createShopId") | |||||
| private Long createShopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "主体类型EnumShopUsersPrincipalType", name = "type") | |||||
| private Integer principalType; | |||||
| @TableField(exist = false) | |||||
| private String principalTypeName; | |||||
| public String getPrincipalTypeName() { | |||||
| if (null != principalType) { | |||||
| return EnumShopUsersPrincipalType.getEnum(principalType).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="名称",name="name") | |||||
| private String name; | |||||
| @io.swagger.annotations.ApiModelProperty(value="手机号",name="phone") | |||||
| private String phone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="法人",name="legalPerson") | |||||
| private String legalPerson; | |||||
| @io.swagger.annotations.ApiModelProperty(value="身份证号码",name="idNumber") | |||||
| private String idNumber; | |||||
| @io.swagger.annotations.ApiModelProperty(value="性别EnumCUserBaseInfoSex",name="sex") | |||||
| private Integer sex; | |||||
| @TableField(exist = false) | |||||
| private String sexName; | |||||
| public String getSexName() { | |||||
| if (null != sex) { | |||||
| return EnumCUserBaseInfoSex.getEnum(sex).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="联系人",name="linkPerson") | |||||
| private String linkPerson; | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||||
| private Date createDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||||
| private Date updateDate; | |||||
| @TableField(exist = false) | |||||
| private Date beginDate; | |||||
| @TableField(exist = false) | |||||
| private Date endDate; | |||||
| @TableField(exist = false) | |||||
| private Integer status; | |||||
| @TableField(exist = false) | |||||
| private String statusName; | |||||
| @TableField(exist = false) | |||||
| private Long shopUserShopId; | |||||
| } | |||||
| @@ -1,62 +0,0 @@ | |||||
| package com.iformall.domain.po; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.common.SortColumn; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.enums.EnumCUserBaseInfoSex; | |||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import com.iformall.enums.EnumShopUsersPrincipalType; | |||||
| import com.iformall.enums.EnumShopUsersStatus; | |||||
| import com.iformall.enums.EnumShopUsersType; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| @TableName(value = "wx_shop_users") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxShopUsersShop extends TenantEntity { | |||||
| private Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺编号", name = "shopId") | |||||
| private Long shopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "人员编号", name = "shopUserId") | |||||
| private Long shopUserId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="入住日期",name="beginDate") | |||||
| private Date beginDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value="离开日期",name="endDate") | |||||
| private Date endDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||||
| private Date createDate; | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||||
| private Date updateDate; | |||||
| @Excel(name="状态",width = 20,orderNum = "7",replace = {"当前_0","往任_1"}) | |||||
| @io.swagger.annotations.ApiModelProperty(value="状态(0:当前, 1:往任)EnumShopUsersStatus",name="status") | |||||
| private Integer status; | |||||
| @TableField(exist = false) | |||||
| private String statusName; | |||||
| public String getStatusName() { | |||||
| if (null != status) { | |||||
| return EnumShopUsersStatus.getEnum(status).getMessage(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @TableField(exist = false) | |||||
| private List<Long> shopIds; | |||||
| } | |||||
| @@ -0,0 +1,12 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxShopUsersInfoMapper extends CommonMapper<WxShopUsersInfo, String> { | |||||
| List<WxShopUsersInfo> findList(WxShopUsersInfo wxShop); | |||||
| } | |||||
| @@ -2,6 +2,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxShopUsers; | import com.iformall.domain.po.WxShopUsers; | ||||
| import java.util.List; | import java.util.List; | ||||
| /** | /** | ||||
| @@ -9,4 +10,5 @@ import java.util.List; | |||||
| public interface WxShopUsersMapper extends CommonMapper<WxShopUsers, String> { | public interface WxShopUsersMapper extends CommonMapper<WxShopUsers, String> { | ||||
| List<WxShopUsers> findList(WxShopUsers wxShop); | List<WxShopUsers> findList(WxShopUsers wxShop); | ||||
| List<Long> findShopIdList(WxShopUsers wxShop); | |||||
| } | } | ||||
| @@ -1,14 +0,0 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxShopUsersShop; | |||||
| import java.util.List; | |||||
| /** | |||||
| */ | |||||
| public interface WxShopUsersShopMapper extends CommonMapper<WxShopUsersShop, String> { | |||||
| List<WxShopUsersShop> findList(WxShopUsersShop wxShop); | |||||
| List<Long> findShopIdList(WxShopUsersShop wxShop); | |||||
| } | |||||
| @@ -14,7 +14,7 @@ import com.iformall.domain.po.WxEnergyFees; | |||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| import com.iformall.print.data.PrintDataParser; | import com.iformall.print.data.PrintDataParser; | ||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| @@ -34,7 +34,7 @@ public class PrintFinanceReceiveDataHandler implements PrintDataParser{ | |||||
| public Object getObjectValue(String name, Object o, Object... params) { | public Object getObjectValue(String name, Object o, Object... params) { | ||||
| Map<Long, WxShop> shopMap = (Map<Long, WxShop>) params[0]; | Map<Long, WxShop> shopMap = (Map<Long, WxShop>) params[0]; | ||||
| Map<Long, WxEnergyFees> feesMap = (Map<Long, WxEnergyFees>) params[1]; | Map<Long, WxEnergyFees> feesMap = (Map<Long, WxEnergyFees>) params[1]; | ||||
| Map<Long, WxShopUsers> shopUserMap = (Map<Long, WxShopUsers>) params[2]; | |||||
| Map<Long, WxShopUsersInfo> shopUserMap = (Map<Long, WxShopUsersInfo>) params[2]; | |||||
| WxFinanceReceive receive = (WxFinanceReceive) o; | WxFinanceReceive receive = (WxFinanceReceive) o; | ||||
| if (name.equals("id")) { | if (name.equals("id")) { | ||||
| return receive.getId(); | return receive.getId(); | ||||
| @@ -10,7 +10,7 @@ import com.iformall.domain.po.WxEnergyFees; | |||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.vo.WxShopBillVo; | import com.iformall.domain.vo.WxShopBillVo; | ||||
| import com.iformall.print.data.PrintDataParser; | import com.iformall.print.data.PrintDataParser; | ||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| @@ -22,7 +22,7 @@ public class PrintMerchantSettleDataHandler implements PrintDataParser{ | |||||
| public Object getObjectValue(String name, Object o,Object... params) { | public Object getObjectValue(String name, Object o,Object... params) { | ||||
| Map<Long, WxShop> shopMap = (Map<Long, WxShop>) params[0]; | Map<Long, WxShop> shopMap = (Map<Long, WxShop>) params[0]; | ||||
| Map<Long, WxEnergyFees> feesMap = (Map<Long, WxEnergyFees>) params[1]; | Map<Long, WxEnergyFees> feesMap = (Map<Long, WxEnergyFees>) params[1]; | ||||
| Map<Long, WxShopUsers> shopUserMap = (Map<Long, WxShopUsers>) params[2]; | |||||
| Map<Long, WxShopUsersInfo> shopUserMap = (Map<Long, WxShopUsersInfo>) params[2]; | |||||
| WxShopBillVo receive = (WxShopBillVo) o; | WxShopBillVo receive = (WxShopBillVo) o; | ||||
| //根据科目来查询对应的信息 | //根据科目来查询对应的信息 | ||||
| if (name.equals("maxDate")) { | if (name.equals("maxDate")) { | ||||
| @@ -5,8 +5,9 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.WxShopUsersPerson; | import com.iformall.domain.po.WxShopUsersPerson; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxShopVo; | import com.iformall.domain.vo.WxShopVo; | ||||
| @@ -126,13 +127,13 @@ public interface WxShopService { | |||||
| List<String> getShopNumberList(WxShop wxShop); | List<String> getShopNumberList(WxShop wxShop); | ||||
| WxShopUsers getOneShopUsers(WxShopUsers wxShopUsers); | |||||
| WxShopUsersInfo getOneShopUsers(WxShopUsers wxShopUsersShop); | |||||
| void saveOrUpdateShopUsers(WxShopUsers wxShopUsers); | |||||
| void saveOrUpdateShopUsers(WxShopUsersInfo wxShopUsers); | |||||
| void deleteShopUsers(WxShopUsers wxShopUsers); | |||||
| void deleteShopUsers(WxShopUsersInfo wxShopUsers); | |||||
| PageInfo<WxShopUsers> shopUsersListAsPage(WxShopUsers record,Integer pageIndex,Integer pageSize); | |||||
| PageInfo<WxShopUsersInfo> shopUsersListAsPage(WxShopUsersInfo record,Integer pageIndex,Integer pageSize); | |||||
| PageInfo<WxShopUsersPerson> shopUsersPersonListAsPage(WxShopUsersPerson record,Integer pageIndex,Integer pageSize); | PageInfo<WxShopUsersPerson> shopUsersPersonListAsPage(WxShopUsersPerson record,Integer pageIndex,Integer pageSize); | ||||
| @@ -140,10 +141,10 @@ public interface WxShopService { | |||||
| void deleteShopUsersPerson(WxShopUsersPerson wxShopUsers); | void deleteShopUsersPerson(WxShopUsersPerson wxShopUsers); | ||||
| List<Long> getUserShopIds(WxShopUsers wxShopUsers); | |||||
| Map<Long,WxShopUsers> getShopUserMap(WxShopUsers wxShopUsers); | |||||
| List<Long> getUserShopIds(WxShopUsersInfo wxShopUsers); | |||||
| Map<Long,WxShopUsersInfo> getShopUserMap(WxShopUsersInfo wxShopUsers); | |||||
| WxShopUsers getCurrentShopUser(TenantEntity tenantEntity,Long shopId); | |||||
| WxShopUsersInfo getCurrentShopUser(TenantEntity tenantEntity,Long shopId); | |||||
| List<Long> getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel ,String shopNumber) ; | List<Long> getFloorBuildShopIds(TenantEntity tenantEntity,String floorRule,Long building,Long floor,Integer shopDel ,String shopNumber) ; | ||||
| @@ -31,7 +31,7 @@ import com.iformall.domain.po.WxMerchantBUser; | |||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.WxBillHotNotify; | import com.iformall.domain.vo.WxBillHotNotify; | ||||
| import com.iformall.domain.vo.WxBillNotify; | import com.iformall.domain.vo.WxBillNotify; | ||||
| @@ -246,16 +246,16 @@ public class WxBillAllHelper { | |||||
| } | } | ||||
| if (shopIdList.size() > 0) { | if (shopIdList.size() > 0) { | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(wxShop); | suq.updateTenantInfo(wxShop); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| suq.setShopIds(shopIdList); | suq.setShopIds(shopIdList); | ||||
| Map<Long, WxShopUsers> shopUserMap = wxShopService.getShopUserMap(suq); | |||||
| Map<Long, WxShopUsersInfo> shopUserMap = wxShopService.getShopUserMap(suq); | |||||
| if (null != shopUserMap) { | if (null != shopUserMap) { | ||||
| for (int i = 0 ; i < retList.size() ; i++) { | for (int i = 0 ; i < retList.size() ; i++) { | ||||
| WxBillNotify bn = retList.get(i); | WxBillNotify bn = retList.get(i); | ||||
| if (null != bn.getShopId()) { | if (null != bn.getShopId()) { | ||||
| WxShopUsers s = shopUserMap.get(bn.getShopId()); | |||||
| WxShopUsersInfo s = shopUserMap.get(bn.getShopId()); | |||||
| if (null != s) { | if (null != s) { | ||||
| bn.setShopUserName(s.getName()); | bn.setShopUserName(s.getName()); | ||||
| bn.setShopUserPerson(s.getLinkPerson()); | bn.setShopUserPerson(s.getLinkPerson()); | ||||
| @@ -286,7 +286,7 @@ public class WxBillAllHelper { | |||||
| if (null != shop) { | if (null != shop) { | ||||
| result.put("shopNumber", shop.getShopNumber()); | result.put("shopNumber", shop.getShopNumber()); | ||||
| } | } | ||||
| WxShopUsers su = wxShopService.getCurrentShopUser(bill, bill.getShopId()); | |||||
| WxShopUsersInfo su = wxShopService.getCurrentShopUser(bill, bill.getShopId()); | |||||
| if (null != su) { | if (null != su) { | ||||
| result.put("merchantName", su.getName()); | result.put("merchantName", su.getName()); | ||||
| result.put("linkPerson", su.getLinkPerson()); | result.put("linkPerson", su.getLinkPerson()); | ||||
| @@ -19,7 +19,7 @@ import com.iformall.domain.po.WxMerchantBUser; | |||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.RatioVo; | import com.iformall.domain.vo.RatioVo; | ||||
| import com.iformall.domain.vo.WxBillHotNotify; | import com.iformall.domain.vo.WxBillHotNotify; | ||||
| @@ -130,7 +130,7 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| } | } | ||||
| //List<Long> _sids = (List<Long>) CollectionUtils.intersection(shopIds, wxBillRent.getShopIdList()); | //List<Long> _sids = (List<Long>) CollectionUtils.intersection(shopIds, wxBillRent.getShopIdList()); | ||||
| if (StringUtils.isNotBlank(wxBillRent.getCusName())) { | if (StringUtils.isNotBlank(wxBillRent.getCusName())) { | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(wxBillRent); | suq.updateTenantInfo(wxBillRent); | ||||
| suq.setName(wxBillRent.getCusName()); | suq.setName(wxBillRent.getCusName()); | ||||
| List<Long> shopIds = wxShopService.getUserShopIds(suq); | List<Long> shopIds = wxShopService.getUserShopIds(suq); | ||||
| @@ -172,14 +172,14 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| } | } | ||||
| Map<Long, WxShop> shopMap = null; | Map<Long, WxShop> shopMap = null; | ||||
| Map<Long, WxShopUsers> shopUserMap = null; | |||||
| Map<Long, WxShopUsersInfo> shopUserMap = null; | |||||
| if (shopIds.size() > 0 ) { | if (shopIds.size() > 0 ) { | ||||
| WxShop sq = new WxShop(); | WxShop sq = new WxShop(); | ||||
| sq.updateTenantInfo(record); | sq.updateTenantInfo(record); | ||||
| sq.setIds(shopIds); | sq.setIds(shopIds); | ||||
| shopMap = wxShopService.findShopMap(sq); | shopMap = wxShopService.findShopMap(sq); | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(record); | suq.updateTenantInfo(record); | ||||
| suq.setShopIds(shopIds); | suq.setShopIds(shopIds); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| @@ -200,7 +200,7 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| } | } | ||||
| if (null != shopUserMap) { | if (null != shopUserMap) { | ||||
| WxShopUsers wsu = shopUserMap.get(e.getShopId()); | |||||
| WxShopUsersInfo wsu = shopUserMap.get(e.getShopId()); | |||||
| if (null != wsu) { | if (null != wsu) { | ||||
| if (StringUtils.isBlank(e.getCusName())) { | if (StringUtils.isBlank(e.getCusName())) { | ||||
| e.setCusName(wsu.getName()); | e.setCusName(wsu.getName()); | ||||
| @@ -238,11 +238,11 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| WxAllBill bill = wxAllBillMapper.selectById(id, tenantEntity.getTenantId()); | WxAllBill bill = wxAllBillMapper.selectById(id, tenantEntity.getTenantId()); | ||||
| if (null != bill && null != bill.getShopId()) { | if (null != bill && null != bill.getShopId()) { | ||||
| WxShop shop = wxShopService.getById(bill.getShopId()); | WxShop shop = wxShopService.getById(bill.getShopId()); | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(tenantEntity); | suq.updateTenantInfo(tenantEntity); | ||||
| suq.setShopId(bill.getShopId()); | suq.setShopId(bill.getShopId()); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| WxShopUsers su = wxShopService.getOneShopUsers(suq); | |||||
| WxShopUsersInfo su = wxShopService.getOneShopUsers(suq); | |||||
| if (null != shop) { | if (null != shop) { | ||||
| bill.setShopNumber(shop.getShopNumber()); | bill.setShopNumber(shop.getShopNumber()); | ||||
| } | } | ||||
| @@ -20,7 +20,7 @@ import com.iformall.domain.po.WxFinanceReceive; | |||||
| import com.iformall.domain.po.WxFinanceReceiveBill; | import com.iformall.domain.po.WxFinanceReceiveBill; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.vo.PrintVo; | import com.iformall.domain.vo.PrintVo; | ||||
| import com.iformall.domain.vo.WxBillSum; | import com.iformall.domain.vo.WxBillSum; | ||||
| @@ -260,10 +260,10 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||||
| shopq.setTenantId(tenantId); | shopq.setTenantId(tenantId); | ||||
| shopq.setIsDel(EnumYesOrNo.NO.getCode()); | shopq.setIsDel(EnumYesOrNo.NO.getCode()); | ||||
| Map<Long, WxShop> shopMap = wxShopService.findShopMap(shopq); | Map<Long, WxShop> shopMap = wxShopService.findShopMap(shopq); | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.setTenantId(tenantId); | suq.setTenantId(tenantId); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| Map<Long, WxShopUsers> shopUserMap = wxShopService.getShopUserMap(suq); | |||||
| Map<Long, WxShopUsersInfo> shopUserMap = wxShopService.getShopUserMap(suq); | |||||
| WxEnergyFees feq = new WxEnergyFees(); | WxEnergyFees feq = new WxEnergyFees(); | ||||
| feq.setTenantId(tenantId); | feq.setTenantId(tenantId); | ||||
| Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(feq); | Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(feq); | ||||
| @@ -339,7 +339,7 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { | |||||
| bq.setOwe(oweTotal.toPlainString()); | bq.setOwe(oweTotal.toPlainString()); | ||||
| bq.setCurrentTime(new Date()); | bq.setCurrentTime(new Date()); | ||||
| if (null != shopUserMap && null != bq.getShopId()) { | if (null != shopUserMap && null != bq.getShopId()) { | ||||
| WxShopUsers su = shopUserMap.get(bq.getShopId()); | |||||
| WxShopUsersInfo su = shopUserMap.get(bq.getShopId()); | |||||
| if (null != su) { | if (null != su) { | ||||
| bq.setCusName(su.getName()); | bq.setCusName(su.getName()); | ||||
| bq.setCusPhone(su.getPhone()); | bq.setCusPhone(su.getPhone()); | ||||
| @@ -30,7 +30,7 @@ import com.iformall.domain.po.WxFinanceReceiveSetoff; | |||||
| import com.iformall.domain.po.WxMallFloor; | import com.iformall.domain.po.WxMallFloor; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | |||||
| import com.iformall.domain.po.base.BaseEntity.SortField; | import com.iformall.domain.po.base.BaseEntity.SortField; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.FinanceAdvanceBillVo; | import com.iformall.domain.vo.FinanceAdvanceBillVo; | ||||
| @@ -1253,11 +1253,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| advanceBill.updateTenantInfo(record); | advanceBill.updateTenantInfo(record); | ||||
| advanceBill.setShopId(wxShop.getId()); | advanceBill.setShopId(wxShop.getId()); | ||||
| if (StringUtils.isBlank(record.getCusName())) { | if (StringUtils.isBlank(record.getCusName())) { | ||||
| WxShopUsers su = new WxShopUsers(); | |||||
| WxShopUsersInfo su = new WxShopUsersInfo(); | |||||
| su.updateTenantInfo(record); | su.updateTenantInfo(record); | ||||
| su.setShopId(wxShop.getId()); | su.setShopId(wxShop.getId()); | ||||
| su.setStatus(EnumShopUsersStatus.LIVE.getCode()); | su.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| WxShopUsers wsu = wxShopService.getOneShopUsers(su); | |||||
| WxShopUsersInfo wsu = wxShopService.getOneShopUsers(su); | |||||
| if (null != wsu) { | if (null != wsu) { | ||||
| advanceBill.setCusName(wsu.getName()); | advanceBill.setCusName(wsu.getName()); | ||||
| } | } | ||||
| @@ -61,7 +61,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| WxShopMapper wxShopMapper; | WxShopMapper wxShopMapper; | ||||
| @Autowired | @Autowired | ||||
| WxShopUsersMapper wxShopUsersMapper; | |||||
| WxShopUsersInfoMapper wxShopUsersMapper; | |||||
| @Autowired | @Autowired | ||||
| WxMerchantShopMapper wxMerchantShopMapper; | WxMerchantShopMapper wxMerchantShopMapper; | ||||
| @@ -2353,12 +2353,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| return null; | return null; | ||||
| } | } | ||||
| WxMerchantShop ms = merchantShopList.get(0); | WxMerchantShop ms = merchantShopList.get(0); | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(m); | suq.updateTenantInfo(m); | ||||
| suq.setShopId(ms.getShopId()); | suq.setShopId(ms.getShopId()); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| suq.setSortColumn(" type desc"); | suq.setSortColumn(" type desc"); | ||||
| List<WxShopUsers> userList = wxShopUsersMapper.findList(suq); | |||||
| List<WxShopUsersInfo> userList = wxShopUsersMapper.findList(suq); | |||||
| if (null == userList || userList.size() <= 0 ){ | if (null == userList || userList.size() <= 0 ){ | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -22,8 +22,9 @@ import com.iformall.mapper.WxMerchantShopMapper; | |||||
| import com.iformall.mapper.WxPropertyContractMapper; | import com.iformall.mapper.WxPropertyContractMapper; | ||||
| import com.iformall.mapper.WxRentContractMapper; | import com.iformall.mapper.WxRentContractMapper; | ||||
| import com.iformall.mapper.WxShopMapper; | import com.iformall.mapper.WxShopMapper; | ||||
| import com.iformall.mapper.WxShopUsersMapper; | |||||
| import com.iformall.mapper.WxShopUsersInfoMapper; | |||||
| import com.iformall.mapper.WxShopUsersPersonMapper; | import com.iformall.mapper.WxShopUsersPersonMapper; | ||||
| import com.iformall.mapper.WxShopUsersMapper; | |||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import cn.afterturn.easypoi.excel.ExcelImportUtil; | import cn.afterturn.easypoi.excel.ExcelImportUtil; | ||||
| @@ -69,7 +70,10 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| WxMerchantShopMapper wxMerchantShopMapper; | WxMerchantShopMapper wxMerchantShopMapper; | ||||
| @Autowired | @Autowired | ||||
| WxShopUsersMapper wxShopUsersMapper; | |||||
| WxShopUsersInfoMapper wxShopUsersMapper; | |||||
| @Autowired | |||||
| WxShopUsersMapper wxShopUsersShopMapper; | |||||
| @Autowired | @Autowired | ||||
| WxShopUsersPersonMapper wxShopUsersPersonMapper; | WxShopUsersPersonMapper wxShopUsersPersonMapper; | ||||
| @@ -329,12 +333,12 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| if (!isSetRentName) { | if (!isSetRentName) { | ||||
| //查询租户和业主 | //查询租户和业主 | ||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(record); | suq.updateTenantInfo(record); | ||||
| suq.setShopId(shopId); | suq.setShopId(shopId); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| suq.setSortColumns("type desc"); | suq.setSortColumns("type desc"); | ||||
| WxShopUsers wsu = this.getOneShopUsers(suq); | |||||
| WxShopUsersInfo wsu = this.getOneShopUsers(suq); | |||||
| if (null != wsu) { | if (null != wsu) { | ||||
| shop.put("rentName",wsu.getName()); | shop.put("rentName",wsu.getName()); | ||||
| shop.put("rentType", wsu.getType()); | shop.put("rentType", wsu.getType()); | ||||
| @@ -1025,17 +1029,29 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public WxShopUsers getOneShopUsers(WxShopUsers wxShopUsers) { | |||||
| wxShopUsers.setSortColumn(" status asc, type desc"); | |||||
| List<WxShopUsers> list = wxShopUsersMapper.findList(wxShopUsers); | |||||
| if (null != list && list.size() > 0) { | |||||
| return list.get(0); | |||||
| public WxShopUsersInfo getOneShopUsers(WxShopUsers wxShopUsersShop) { | |||||
| wxShopUsersShop.setSortColumn(" status asc, type desc"); | |||||
| List<WxShopUsers> shopUserList = wxShopUsersShopMapper.findList(wxShopUsersShop); | |||||
| if (null != shopUserList && shopUserList.size() > 0) { | |||||
| WxShopUsers sus = shopUserList.get(0); | |||||
| WxShopUsersInfo su = wxShopUsersMapper.selectById(sus.getShopUserId()); | |||||
| if (null != su) { | |||||
| su.setBeginDate(sus.getBeginDate()); | |||||
| su.setEndDate(sus.getEndDate()); | |||||
| su.setStatus(sus.getStatus()); | |||||
| su.setStatusName(sus.getStatusName()); | |||||
| } | |||||
| return su; | |||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| @Override | @Override | ||||
| public void saveOrUpdateShopUsers(WxShopUsers record) { | |||||
| public void saveOrUpdateShopUsers(WxShopUsersInfo record) { | |||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| @@ -1051,12 +1067,12 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public void deleteShopUsers(WxShopUsers wxShopUsers) { | |||||
| public void deleteShopUsers(WxShopUsersInfo wxShopUsers) { | |||||
| wxShopUsersMapper.deleteById(wxShopUsers.getId()); | wxShopUsersMapper.deleteById(wxShopUsers.getId()); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public PageInfo<WxShopUsers> shopUsersListAsPage(WxShopUsers record, Integer pageIndex, Integer pageSize) { | |||||
| public PageInfo<WxShopUsersInfo> shopUsersListAsPage(WxShopUsersInfo record, Integer pageIndex, Integer pageSize) { | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxShopUsersMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxShopUsersMapper.findList(record)); | ||||
| } | } | ||||
| @@ -1090,20 +1106,20 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public List<Long> getUserShopIds(WxShopUsers wxShopUsers) { | |||||
| public List<Long> getUserShopIds(WxShopUsersInfo wxShopUsers) { | |||||
| return wxShopUsersMapper.findShopIdList(wxShopUsers); | return wxShopUsersMapper.findShopIdList(wxShopUsers); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public Map<Long, WxShopUsers> getShopUserMap(WxShopUsers wxShopUsers) { | |||||
| public Map<Long, WxShopUsersInfo> getShopUserMap(WxShopUsersInfo wxShopUsers) { | |||||
| wxShopUsers.setSortColumn(" status asc, type desc"); | wxShopUsers.setSortColumn(" status asc, type desc"); | ||||
| List<WxShopUsers> list = wxShopUsersMapper.findList(wxShopUsers); | |||||
| List<WxShopUsersInfo> list = wxShopUsersMapper.findList(wxShopUsers); | |||||
| if (null == list || list.size() <= 0 ) { | if (null == list || list.size() <= 0 ) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| Map<Long,WxShopUsers> retMap = new HashMap<Long,WxShopUsers>(); | |||||
| Map<Long,WxShopUsersInfo> retMap = new HashMap<Long,WxShopUsersInfo>(); | |||||
| for (int i = 0 ; i < list.size(); i++) { | for (int i = 0 ; i < list.size(); i++) { | ||||
| WxShopUsers su = list.get(i); | |||||
| WxShopUsersInfo su = list.get(i); | |||||
| if (null != su.getShopId()) { | if (null != su.getShopId()) { | ||||
| if (!retMap.containsKey(su.getShopId())) { | if (!retMap.containsKey(su.getShopId())) { | ||||
| retMap.put(su.getShopId(), su); | retMap.put(su.getShopId(), su); | ||||
| @@ -1114,13 +1130,13 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public WxShopUsers getCurrentShopUser(TenantEntity tenantEntity, Long shopId) { | |||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| public WxShopUsersInfo getCurrentShopUser(TenantEntity tenantEntity, Long shopId) { | |||||
| WxShopUsersInfo suq = new WxShopUsersInfo(); | |||||
| suq.updateTenantInfo(tenantEntity); | suq.updateTenantInfo(tenantEntity); | ||||
| suq.setShopId(shopId); | suq.setShopId(shopId); | ||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | ||||
| suq.setSortColumn("type desc"); | suq.setSortColumn("type desc"); | ||||
| List<WxShopUsers> list = wxShopUsersMapper.findList(suq); | |||||
| List<WxShopUsersInfo> list = wxShopUsersMapper.findList(suq); | |||||
| if (null == list || list.size() <= 0 ) { | if (null == list || list.size() <= 0 ) { | ||||
| return null; | return null; | ||||
| }; | }; | ||||
| @@ -1,21 +1,25 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!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.iformall.mapper.WxShopUsersShopMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxShopUsersShop"> | |||||
| <mapper namespace="com.iformall.mapper.WxShopUsersInfoMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxShopUsersInfo"> | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | <id column="id" jdbcType="BIGINT" property="id"/> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | ||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="shop_user_id" jdbcType="BIGINT" property="shopUserId"/> | |||||
| <result column="begin_date" jdbcType="TIMESTAMP" property="beginDate"/> | |||||
| <result column="end_date" jdbcType="TIMESTAMP" property="endDate"/> | |||||
| <result column="create_shop_id" jdbcType="BIGINT" property="createShopId"/> | |||||
| <result column="principal_type" jdbcType="INTEGER" property="principalType"/> | |||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | |||||
| <result column="phone" jdbcType="VARCHAR" property="phone"/> | |||||
| <result column="legal_person" jdbcType="VARCHAR" property="legalPerson"/> | |||||
| <result column="id_number" jdbcType="VARCHAR" property="idNumber"/> | |||||
| <result column="sex" jdbcType="INTEGER" property="sex"/> | |||||
| <result column="link_person" jdbcType="VARCHAR" property="linkPerson"/> | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | ||||
| <result column="status" jdbcType="INTEGER" property="status"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`shop_id`,`shop_user_id`,`begin_date`,`end_date`,`create_date`,`update_date`,`status` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_shop_id`,`principal_type`,`name`,`phone`,`legal_person`,`id_number`,`sex`, | |||||
| `link_person`,`create_date`,`update_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -32,21 +36,22 @@ | |||||
| and `parent_tenant_id` = #{parentTenantId} | and `parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != shopId"> | |||||
| and `shop_id` = #{shopId} | |||||
| <if test=" null != createShopId"> | |||||
| and `create_shop_id` = #{createShopId} | |||||
| </if> | </if> | ||||
| <if test=" null != status"> | |||||
| and `status` = #{status} | |||||
| <if test=" null != principalType"> | |||||
| and `principal_type` = #{principalType} | |||||
| </if> | </if> | ||||
| <if test=" null != shopIds "> | |||||
| and shop_id in | |||||
| <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| <if test=" null != name and name != '' "> | |||||
| and `name` like concat('%', #{name},'%') | |||||
| </if> | </if> | ||||
| <if test=" null != phone and phone != '' "> | |||||
| and `phone` like concat('%', #{phone},'%') | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -56,15 +61,10 @@ | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | <if test=" null != sortColumns">order by ${sortColumns}</if> | ||||
| </sql> | </sql> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.WxShopUsersShop" resultMap="BaseResultMap"> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxShopUsersInfo" resultMap="BaseResultMap"> | |||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_shop_users_shop | |||||
| from wx_shop_users_info | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findShopIdList" parameterType="com.iformall.domain.po.WxShopUsersShop" resultType="Long"> | |||||
| select distinct shop_id | |||||
| from wx_shop_users_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -5,22 +5,18 @@ | |||||
| <id column="id" jdbcType="BIGINT" property="id"/> | <id column="id" jdbcType="BIGINT" property="id"/> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | ||||
| <result column="create_shop_id" jdbcType="BIGINT" property="createShopId"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="shop_user_id" jdbcType="BIGINT" property="shopUserId"/> | |||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
| <result column="principal_type" jdbcType="INTEGER" property="principalType"/> | |||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | |||||
| <result column="phone" jdbcType="VARCHAR" property="phone"/> | |||||
| <result column="legal_person" jdbcType="VARCHAR" property="legalPerson"/> | |||||
| <result column="id_number" jdbcType="VARCHAR" property="idNumber"/> | |||||
| <result column="sex" jdbcType="INTEGER" property="sex"/> | |||||
| <result column="link_person" jdbcType="VARCHAR" property="linkPerson"/> | |||||
| <result column="begin_date" jdbcType="TIMESTAMP" property="beginDate"/> | |||||
| <result column="end_date" jdbcType="TIMESTAMP" property="endDate"/> | |||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | ||||
| <result column="status" jdbcType="INTEGER" property="status"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_shop_id`,`type`,`principal_type`,`name`,`phone`,`legal_person`,`id_number`,`sex`, | |||||
| `link_person`,`create_date`,`update_date` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`shop_id`,`shop_user_id`,`type`,`begin_date`,`end_date`,`create_date`,`update_date`,`status` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -37,26 +33,29 @@ | |||||
| and `parent_tenant_id` = #{parentTenantId} | and `parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != createShopId"> | |||||
| and `create_shop_id` = #{createShopId} | |||||
| <if test=" null != shopUserId"> | |||||
| and `shop_user_id` = #{shopUserId} | |||||
| </if> | </if> | ||||
| <if test=" null != type"> | |||||
| <if test=" null != type"> | |||||
| and `type` = #{type} | and `type` = #{type} | ||||
| </if> | </if> | ||||
| <if test=" null != principalType"> | |||||
| and `principal_type` = #{principalType} | |||||
| <if test=" null != shopId"> | |||||
| and `shop_id` = #{shopId} | |||||
| </if> | </if> | ||||
| <if test=" null != name and name != '' "> | |||||
| and `name` like concat('%', #{name},'%') | |||||
| <if test=" null != status"> | |||||
| and `status` = #{status} | |||||
| </if> | </if> | ||||
| <if test=" null != phone and phone != '' "> | |||||
| and `phone` like concat('%', #{phone},'%') | |||||
| <if test=" null != shopIds "> | |||||
| and shop_id in | |||||
| <foreach collection="shopIds" index="index" item="sidItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | </if> | ||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -69,7 +68,12 @@ | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxShopUsers" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.WxShopUsers" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_shop_users | |||||
| from wx_shop_users_shop | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findShopIdList" parameterType="com.iformall.domain.po.WxShopUsers" resultType="Long"> | |||||
| select distinct shop_id | |||||
| from wx_shop_users_shop | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||