| @@ -9,6 +9,7 @@ import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.domain.po.WxBrand; | import com.iformall.domain.po.WxBrand; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.enums.EnumDelFlag; | import com.iformall.enums.EnumDelFlag; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.WxBrandService; | import com.iformall.service.WxBrandService; | ||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -72,7 +73,7 @@ public class WxBrandController extends BaseController { | |||||
| //判断是否解绑商户 | //判断是否解绑商户 | ||||
| WxMerchant wxMerchant = new WxMerchant(); | WxMerchant wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(wxBrand); | wxMerchant.updateTenantInfo(wxBrand); | ||||
| wxMerchant.setIsDel(0); | |||||
| wxMerchant.setIsDel(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchant.setBrand(wxBrand.getId()); | wxMerchant.setBrand(wxBrand.getId()); | ||||
| List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant); | List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant); | ||||
| @@ -66,6 +66,7 @@ public class WxMerchantController extends BaseController { | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | if (null == wxMerchant) wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,true); | final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,true); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -83,6 +84,7 @@ public class WxMerchantController extends BaseController { | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | if (null == wxMerchant) wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -100,6 +102,7 @@ public class WxMerchantController extends BaseController { | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | if (null == wxMerchant) wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -277,6 +280,7 @@ public class WxMerchantController extends BaseController { | |||||
| public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchantService.exportData(wxMerchant,request,response); | wxMerchantService.exportData(wxMerchant,request,response); | ||||
| } | } | ||||
| @@ -10,6 +10,7 @@ import java.util.Map; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import com.iformall.enums.*; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -41,16 +42,6 @@ import com.iformall.domain.po.WxRentContract; | |||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.po.base.BaseEntity.SortField; | import com.iformall.domain.po.base.BaseEntity.SortField; | ||||
| import com.iformall.enums.EnumContractOperationType; | |||||
| import com.iformall.enums.EnumContractType; | |||||
| import com.iformall.enums.EnumFlowContractType; | |||||
| import com.iformall.enums.EnumFlowKey; | |||||
| import com.iformall.enums.EnumFromType; | |||||
| import com.iformall.enums.EnumIsPreview; | |||||
| import com.iformall.enums.EnumRentContractAppStatus; | |||||
| import com.iformall.enums.EnumRentContractStatus; | |||||
| import com.iformall.enums.EnumRentShopType; | |||||
| import com.iformall.enums.EnumRentStartType; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.mapper.WxBillPropertyMapper; | import com.iformall.mapper.WxBillPropertyMapper; | ||||
| import com.iformall.mapper.WxBillRentMapper; | import com.iformall.mapper.WxBillRentMapper; | ||||
| @@ -753,6 +744,7 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| WxMerchant wxMerchant = new WxMerchant(); | WxMerchant wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setRentShopType(shopType); | wxMerchant.setRentShopType(shopType); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| return new ResultData(Result.SUCCESS, "查询成功", wxMerchantService.getMerchantList(wxMerchant)); | return new ResultData(Result.SUCCESS, "查询成功", wxMerchantService.getMerchantList(wxMerchant)); | ||||
| } | } | ||||
| @@ -8,6 +8,7 @@ import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxMerchantVo; | import com.iformall.domain.vo.WxMerchantVo; | ||||
| import com.iformall.enums.EnumMerchantPublic; | import com.iformall.enums.EnumMerchantPublic; | ||||
| import com.iformall.enums.EnumMerchantStatus; | import com.iformall.enums.EnumMerchantStatus; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import com.iformall.utils.HashUtil; | import com.iformall.utils.HashUtil; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -43,6 +44,7 @@ public class WxMerchantController extends BaseController { | |||||
| wxMerchantDto.updateTenantInfo(getTenantInfo()); | wxMerchantDto.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchantDto.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | wxMerchantDto.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | ||||
| wxMerchantDto.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | wxMerchantDto.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | ||||
| wxMerchantDto.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| return new ResultData(wxMerchantService.listAsPageCVo(wxMerchantDto, pageNum, pageSize,true)); | return new ResultData(wxMerchantService.listAsPageCVo(wxMerchantDto, pageNum, pageSize,true)); | ||||
| } | } | ||||
| @@ -37,6 +37,9 @@ public class WxMerchantDto extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") | @io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "show") | ||||
| private Integer isPublic; | private Integer isPublic; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "是否显示在广场", name = "isPrivate") | |||||
| private Integer isPrivate; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "品牌名称", name = "brandName") | @io.swagger.annotations.ApiModelProperty(value = "品牌名称", name = "brandName") | ||||
| private String brandName; | private String brandName; | ||||
| @@ -153,9 +153,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| @Override | @Override | ||||
| public PageInfo<WxMerchant> listAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxMerchant> listAsPage(WxMerchant record, Integer pageIndex, Integer pageSize) { | ||||
| if(record.getIsPrivate() == null){ | |||||
| record.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| } | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | ||||
| } | } | ||||
| @@ -275,9 +272,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| @Override | @Override | ||||
| public List<WxMerchant> findList(WxMerchant record) { | public List<WxMerchant> findList(WxMerchant record) { | ||||
| if(record.getIsPrivate() == null){ | |||||
| record.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| } | |||||
| return wxMerchantMapper.findList(record); | return wxMerchantMapper.findList(record); | ||||
| } | } | ||||
| @@ -285,9 +279,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| public List<WxMerchantSimpleVo> findList(TenantEntity tenantEntity) { | public List<WxMerchantSimpleVo> findList(TenantEntity tenantEntity) { | ||||
| WxMerchant wxMerchant = new WxMerchant(); | WxMerchant wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(tenantEntity); | wxMerchant.updateTenantInfo(tenantEntity); | ||||
| if(wxMerchant.getIsPrivate() == null){ | |||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| } | |||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode()); | wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode()); | ||||
| List<WxMerchant> wxMerchantList = wxMerchantMapper.findList(wxMerchant); | List<WxMerchant> wxMerchantList = wxMerchantMapper.findList(wxMerchant); | ||||
| List<WxMerchantSimpleVo> collect = wxMerchantList.stream().map(x -> { | List<WxMerchantSimpleVo> collect = wxMerchantList.stream().map(x -> { | ||||
| @@ -938,9 +930,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| @Override | @Override | ||||
| public void exportData(WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | public void exportData(WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | ||||
| if(wxMerchant.getIsPrivate() == null){ | |||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| } | |||||
| List<WxMerchant> list = wxMerchantMapper.findList(wxMerchant); | List<WxMerchant> list = wxMerchantMapper.findList(wxMerchant); | ||||
| list.stream().forEach(m->{ | list.stream().forEach(m->{ | ||||
| @@ -1183,9 +1173,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| @Override | @Override | ||||
| public PageInfo<WxMerchant> listVoAsPage(WxMerchant record, Integer pageIndex, Integer pageSize,boolean hasRentContractInfo) { | public PageInfo<WxMerchant> listVoAsPage(WxMerchant record, Integer pageIndex, Integer pageSize,boolean hasRentContractInfo) { | ||||
| if(record.getIsPrivate() == null){ | |||||
| record.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| } | |||||
| Map<Long,WxRentContract> merchantRentMap = new HashMap<Long,WxRentContract>(); | Map<Long,WxRentContract> merchantRentMap = new HashMap<Long,WxRentContract>(); | ||||
| initQueryParam(record,hasRentContractInfo, merchantRentMap); | initQueryParam(record,hasRentContractInfo, merchantRentMap); | ||||
| PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | ||||
| @@ -347,13 +347,18 @@ | |||||
| <select id="getMerchantList" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap"> | <select id="getMerchantList" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap"> | ||||
| select <include refid="allColumns"/> from wx_merchant m where m.is_del=0 and m.status=1 | |||||
| select <include refid="allColumns"/> | |||||
| from wx_merchant m | |||||
| where m.is_del=0 and m.status=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and m.`tenant_id` = #{tenantId} | and m.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | <if test=" null != parentTenantId and '' != parentTenantId"> | ||||
| and m.`parent_tenant_id` = #{parentTenantId} | and m.`parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != isPrivate"> | |||||
| and m.`is_private` = #{isPrivate} | |||||
| </if> | |||||
| order by m.create_date desc | order by m.create_date desc | ||||
| </select> | </select> | ||||
| @@ -17,6 +17,7 @@ import com.iformall.domain.vo.WxMerchantVo; | |||||
| import com.iformall.enums.EnumAppPlat; | import com.iformall.enums.EnumAppPlat; | ||||
| import com.iformall.enums.EnumMerchantStatus; | import com.iformall.enums.EnumMerchantStatus; | ||||
| import com.iformall.enums.EnumPayWay; | import com.iformall.enums.EnumPayWay; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.QrCodeService; | import com.iformall.service.QrCodeService; | ||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| @@ -59,6 +60,7 @@ public class WxMerchantController extends BaseController { | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | if (null == wxMerchant) wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -76,6 +78,7 @@ public class WxMerchantController extends BaseController { | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | if (null == wxMerchant) wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -93,6 +96,7 @@ public class WxMerchantController extends BaseController { | |||||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | if (null == wxMerchant) wxMerchant = new WxMerchant(); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -244,6 +248,7 @@ public class WxMerchantController extends BaseController { | |||||
| public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | wxMerchant.updateTenantInfo(getTenantInfo()); | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| wxMerchantService.exportData(wxMerchant,request,response); | wxMerchantService.exportData(wxMerchant,request,response); | ||||
| } | } | ||||
| @@ -10,6 +10,7 @@ import com.iformall.domain.vo.WxMerchantVo; | |||||
| import com.iformall.enums.EnumMerchantPublic; | import com.iformall.enums.EnumMerchantPublic; | ||||
| import com.iformall.enums.EnumMerchantStatus; | import com.iformall.enums.EnumMerchantStatus; | ||||
| import com.iformall.enums.EnumTtCouponStatus; | import com.iformall.enums.EnumTtCouponStatus; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import com.iformall.utils.HashUtil; | import com.iformall.utils.HashUtil; | ||||
| @@ -46,6 +47,7 @@ public class WxMerchantController extends BaseController { | |||||
| wxMerchantDto.updateTenantInfo(getParentTenantInfo()); | wxMerchantDto.updateTenantInfo(getParentTenantInfo()); | ||||
| wxMerchantDto.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | wxMerchantDto.setMerchantStatus(EnumMerchantStatus.VALID.getCode()); | ||||
| wxMerchantDto.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | wxMerchantDto.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | ||||
| wxMerchantDto.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| return new ResultData(wxMerchantService.listAsPageCVo(wxMerchantDto, pageNum, pageSize,true)); | return new ResultData(wxMerchantService.listAsPageCVo(wxMerchantDto, pageNum, pageSize,true)); | ||||
| } | } | ||||
| @@ -60,6 +62,7 @@ public class WxMerchantController extends BaseController { | |||||
| merchant.updateTenantInfo(getParentTenantInfo()); | merchant.updateTenantInfo(getParentTenantInfo()); | ||||
| merchant.setStatus(EnumMerchantStatus.VALID.getCode()); | merchant.setStatus(EnumMerchantStatus.VALID.getCode()); | ||||
| merchant.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | merchant.setIsPublic(EnumMerchantPublic.PUBLIC.getCode()); | ||||
| merchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | |||||
| return new ResultData(wxMerchantService.listAsPage(merchant, pageNum, pageSize)); | return new ResultData(wxMerchantService.listAsPage(merchant, pageNum, pageSize)); | ||||
| } | } | ||||