413 changed files with 9475 additions and 6380 deletions
-
165cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/BusinessController.java
-
5cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ClassifyController.java
-
8cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/DiscountController.java
-
10cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/FinanceController.java
-
1cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/LiveProductController.java
-
1cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/SeckillController.java
-
8cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopCheckController.java
-
45cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopController.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessUserDAO.java
-
58cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessDAO.java
-
35cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessUserDAO.java
-
2cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/permission/CerePlatformPermissionDAO.java
-
7cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/product/CereProductClassifyDAO.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CerePlatformShopDAO.java
-
5cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopCheckDAO.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopEnterpriseDAO.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopIndividualBusinessesDAO.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopOtherOrganizationsDAO.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopPersonalDAO.java
-
192cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/Business.java
-
39cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/BusinessGetAll.java
-
65cereshop-admin/src/main/java/com/shop/cereshop/admin/page/product/ProductClassify.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/page/shop/ShopGetAll.java
-
57cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetAllParam.java
-
24cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetByIdParam.java
-
92cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessSaveParam.java
-
30cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessStartParam.java
-
96cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessUpdateParam.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/param/product/ClassifyLevelParam.java
-
45cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopSaveParam.java
-
57cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopUpdateParam.java
-
8cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetAllParam.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetByIdParam.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckHandleParam.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessUserService.java
-
46cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessService.java
-
23cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessUserService.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopEnterpriseService.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopIndividualBusinessesService.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopOtherOrganizationsService.java
-
6cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopPersonalService.java
-
14cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessUserServiceImpl.java
-
252cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessServiceImpl.java
-
48cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessUserServiceImpl.java
-
10cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopEnterpriseServiceImpl.java
-
10cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopIndividualBusinessesServiceImpl.java
-
10cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopOtherOrganizationsServiceImpl.java
-
10cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopPersonalServiceImpl.java
-
14cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CereBusinessPermissionServiceImpl.java
-
2cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CerePlatformPermissionServiceImpl.java
-
4cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/CereProductClassifyService.java
-
81cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/impl/CereProductClassifyServiceImpl.java
-
18cereshop-admin/src/main/java/com/shop/cereshop/admin/service/sharesetting/impl/CerePlatformShareSettingServiceImpl.java
-
2cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CerePlatformShopService.java
-
3cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopCheckService.java
-
107cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CerePlatformShopServiceImpl.java
-
184cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopCheckServiceImpl.java
-
28cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml
-
582cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml
-
176cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml
-
2cereshop-admin/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml
-
38cereshop-admin/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml
-
44cereshop-admin/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml
-
28cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopCheckDAO.xml
-
18cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopEnterpriseDAO.xml
-
18cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml
-
18cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml
-
18cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml
-
5cereshop-app/src/main/java/com/shop/cereshop/app/controller/index/LoginController.java
-
99cereshop-app/src/main/java/com/shop/cereshop/app/controller/shop/ShopCheckController.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessUserDAO.java
-
22cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java
-
28cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessUserDAO.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopEnterpriseDAO.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopIndividualBusinessesDAO.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopOtherOrganizationsDAO.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopPersonalDAO.java
-
16cereshop-app/src/main/java/com/shop/cereshop/app/dao/buyer/CereBuyerUserDAO.java
-
9cereshop-app/src/main/java/com/shop/cereshop/app/dao/product/CereProductClassifyDAO.java
-
2cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CerePlatformShopDAO.java
-
17cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopCheckDAO.java
-
34cereshop-app/src/main/java/com/shop/cereshop/app/interceptor/AuthorizationInterceptor.java
-
3cereshop-app/src/main/java/com/shop/cereshop/app/page/index/Index.java
-
30cereshop-app/src/main/java/com/shop/cereshop/app/page/index/ProductClassify.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/page/settlement/SettlementShop.java
-
4cereshop-app/src/main/java/com/shop/cereshop/app/page/shop/PlatformShop.java
-
7cereshop-app/src/main/java/com/shop/cereshop/app/param/classify/ClassifyProductParam.java
-
2cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopEnterpriseParam.java
-
2cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopIndividualBusinessesParam.java
-
2cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopOtherOrganizationsParam.java
-
2cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopPersonalParam.java
-
77cereshop-app/src/main/java/com/shop/cereshop/app/pay/xs/service/impl/XsPayServiceImpl.java
-
6cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessUserService.java
-
17cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessService.java
-
17cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessUserService.java
-
14cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessUserServiceImpl.java
-
57cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessServiceImpl.java
-
35cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessUserServiceImpl.java
-
2cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/CereBuyerUserService.java
-
41cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/impl/CereBuyerUserServiceImpl.java
@ -0,0 +1,165 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.controller; |
|||
|
|||
import com.shop.cereshop.admin.annotation.NoRepeatSubmit; |
|||
import com.shop.cereshop.admin.annotation.NoRepeatWebLog; |
|||
import com.shop.cereshop.admin.page.business.BusinessGetAll; |
|||
import com.shop.cereshop.admin.param.business.*; |
|||
import com.shop.cereshop.admin.service.business.CerePlatformBusinessService; |
|||
import com.shop.cereshop.admin.service.business.CerePlatformBusinessUserService; |
|||
import com.shop.cereshop.admin.utils.ContextUtil; |
|||
import com.shop.cereshop.commons.constant.CoReturnFormat; |
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; |
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.shop.cereshop.commons.domain.common.Page; |
|||
import com.shop.cereshop.commons.domain.user.CerePlatformUser; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
import com.shop.cereshop.commons.result.Result; |
|||
import com.shop.cereshop.commons.utils.GsonUtil; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
/** |
|||
* 商家 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("business") |
|||
/** |
|||
* 注解方式生成日志对象,指定topic生成对象类名 |
|||
*/ |
|||
@Slf4j(topic = "BusinessController") |
|||
@Api(value = "商家模块", tags = "商家模块") |
|||
public class BusinessController { |
|||
|
|||
@Autowired |
|||
private CerePlatformBusinessService cerePlatformBusinessService; |
|||
|
|||
@Autowired |
|||
private CerePlatformBusinessUserService cerePlatformBusinessUserService; |
|||
|
|||
/** |
|||
* 新建商家 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "save") |
|||
@NoRepeatSubmit |
|||
@ApiOperation(value = "新建商家") |
|||
@NoRepeatWebLog |
|||
public Result save(@RequestBody @Validated BusinessSaveParam param, HttpServletRequest request) throws CoBusinessException{ |
|||
//校验商家名称是否存在 |
|||
CerePlatformBusiness business= cerePlatformBusinessService.findByBusinessName(param.getBusinessName()); |
|||
if(business!=null){ |
|||
return new Result(CoReturnFormat.SHOP_NAME_ALREADY); |
|||
} |
|||
CerePlatformBusiness platformShop=cerePlatformBusinessService.findByBusinessPhone(param.getBusinessPhone()); |
|||
if(platformShop!=null){ |
|||
return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); |
|||
} |
|||
//校验手机号是否已注册 |
|||
CerePlatformBusinessUser cerePlatformBusinessUser= cerePlatformBusinessUserService.findByUserName(param.getBusinessPhone()); |
|||
if(cerePlatformBusinessUser!=null){ |
|||
return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); |
|||
} |
|||
//获取当前登录账户 |
|||
CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); |
|||
cerePlatformBusinessService.save(param,user); |
|||
return new Result(user.getUsername(),"新建商家", GsonUtil.objectToGson(param)); |
|||
} |
|||
|
|||
/** |
|||
* 修改商家 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "update") |
|||
@NoRepeatSubmit |
|||
@ApiOperation(value = "修改商家") |
|||
@NoRepeatWebLog |
|||
public Result update(@RequestBody BusinessUpdateParam param, HttpServletRequest request) throws CoBusinessException{ |
|||
//校验商家名称是否存在 |
|||
CerePlatformBusiness business= cerePlatformBusinessService.checkBusinessIdByName(param.getBusinessName(),param.getBusinessId()); |
|||
if(business!=null){ |
|||
return new Result(CoReturnFormat.SHOP_NAME_ALREADY); |
|||
} |
|||
CerePlatformBusiness platformShop=cerePlatformBusinessService.checkBusinessIdByPhone(param.getBusinessPhone(),param.getBusinessId()); |
|||
if(platformShop!=null){ |
|||
return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); |
|||
} |
|||
//校验手机号是否已注册 |
|||
CerePlatformBusinessUser businessUser = cerePlatformBusinessUserService.checkUserName(param.getBusinessPhone(),param.getBusinessId()); |
|||
if(businessUser!=null){ |
|||
return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); |
|||
} |
|||
//获取当前登录账户 |
|||
CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); |
|||
cerePlatformBusinessService.update(param,user); |
|||
return new Result(user.getUsername(),"修改商家", GsonUtil.objectToGson(param)); |
|||
} |
|||
|
|||
/** |
|||
* 启停用 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "start") |
|||
@NoRepeatSubmit |
|||
@ApiOperation(value = "启停用") |
|||
@NoRepeatWebLog |
|||
public Result start(@RequestBody BusinessStartParam param, HttpServletRequest request) throws CoBusinessException{ |
|||
//获取当前登录账户 |
|||
CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); |
|||
cerePlatformBusinessService.startOrStop(param,user); |
|||
return new Result(user.getUsername(),"启停用", GsonUtil.objectToGson(param)); |
|||
} |
|||
|
|||
/** |
|||
* 商家编辑查询 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "getById") |
|||
@ApiOperation(value = "商家编辑查询") |
|||
public Result<BusinessGetAll> getById(@RequestBody BusinessGetByIdParam param) throws CoBusinessException,Exception{ |
|||
BusinessGetAll business= cerePlatformBusinessService.getById(param.getBusinessId()); |
|||
return new Result(business); |
|||
} |
|||
|
|||
/** |
|||
* 商家管理查询 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "getAll") |
|||
@ApiOperation(value = "商家管理查询") |
|||
public Result<Page<BusinessGetAll>> getAll(@RequestBody BusinessGetAllParam param) throws CoBusinessException{ |
|||
Page page= cerePlatformBusinessService.getAll(param); |
|||
return new Result(page); |
|||
} |
|||
|
|||
/** |
|||
* 注销商家数据 |
|||
* @param param |
|||
* @return |
|||
*/ |
|||
@PostMapping(value = "cleanShop") |
|||
@ApiOperation(value = "注销商家数据") |
|||
public Result<Boolean> cleanShop(@RequestBody BusinessGetByIdParam param) throws CoBusinessException{ |
|||
ContextUtil.interceptDelete(); |
|||
Boolean result = cerePlatformBusinessService.cleanShop(param.getBusinessId()); |
|||
return new Result(result); |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.dao.business; |
|||
|
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
@Mapper |
|||
public interface CerePlatformBusinessUserDAO extends BaseMapper<CerePlatformBusinessUser> { |
|||
int deleteByPrimaryKey(Long businessUserId); |
|||
|
|||
int insertSelective(CerePlatformBusinessUser record); |
|||
|
|||
CerePlatformBusinessUser selectByPrimaryKey(Long businessUserId); |
|||
|
|||
int updateByPrimaryKeySelective(CerePlatformBusinessUser record); |
|||
|
|||
int updateByPrimaryKey(CerePlatformBusinessUser record); |
|||
|
|||
Long findBusinessByUsername(String username); |
|||
|
|||
CerePlatformBusinessUser findByPhone(String phone); |
|||
|
|||
CerePlatformBusinessUser findByUserName(String username); |
|||
|
|||
CerePlatformBusinessUser checkUserName(@Param("username") String username, @Param("businessUserId") Long businessUserId); |
|||
|
|||
CerePlatformBusinessUser checkPhone(@Param("phone") String phone, @Param("businessUserId") Long businessUserId); |
|||
|
|||
} |
|||
@ -0,0 +1,192 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.page.business; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 商家信息返回数据实体类 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "Business", description = "商家信息返回数据实体类") |
|||
public class Business { |
|||
|
|||
/** |
|||
* 处理id |
|||
*/ |
|||
@ApiModelProperty(value = "处理id ") |
|||
private Long checkId; |
|||
|
|||
/** |
|||
* 商家id |
|||
*/ |
|||
@ApiModelProperty(value = "商家id") |
|||
private Long businessId; |
|||
|
|||
/** |
|||
* 入驻处理状态 0-未处理 1-通过 2-拒绝 |
|||
*/ |
|||
@ApiModelProperty(value = "入驻处理状态 0-未处理 1-通过 2-拒绝") |
|||
private Long checkState; |
|||
|
|||
/** |
|||
* 商家名称 |
|||
*/ |
|||
@ApiModelProperty(value = "商家名称") |
|||
private String businessName; |
|||
|
|||
/** |
|||
* 商家地址 |
|||
*/ |
|||
@ApiModelProperty(value = "商家地址") |
|||
private String businessAdress; |
|||
|
|||
/** |
|||
* 商家手机号 |
|||
*/ |
|||
@ApiModelProperty(value = "商家手机号") |
|||
private String businessPhone; |
|||
|
|||
/** |
|||
* 主体类型 1-个人 2-个体工商户 3-企业 4-其他组织 |
|||
*/ |
|||
@ApiModelProperty(value = "主体类型 1-个人 2-个体工商户 3-企业 4-其他组织") |
|||
private Integer authenType; |
|||
|
|||
/** |
|||
* 商家负责人 |
|||
*/ |
|||
@ApiModelProperty(value = "商家负责人") |
|||
private String chargePersonName; |
|||
|
|||
/** |
|||
* 负责人电话 |
|||
*/ |
|||
@ApiModelProperty(value = "负责人电话") |
|||
private String chargePersonPhone; |
|||
|
|||
/** |
|||
* 申请时间 |
|||
*/ |
|||
@ApiModelProperty(value = "申请时间") |
|||
private String createTime; |
|||
|
|||
/** |
|||
* 客服电话 |
|||
*/ |
|||
@ApiModelProperty(value = "客服电话") |
|||
private String servicePhone; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@ApiModelProperty(value = "姓名") |
|||
private String name; |
|||
|
|||
/** |
|||
* 证件类型 |
|||
*/ |
|||
private Long cardType; |
|||
|
|||
/** |
|||
* 证件类型名称 |
|||
*/ |
|||
@ApiModelProperty(value = "证件类型名称") |
|||
private String cardTypeName; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
@ApiModelProperty(value = "身份证号") |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 身份证有效期 |
|||
*/ |
|||
@ApiModelProperty(value = "身份证有效期") |
|||
private String cardTime; |
|||
|
|||
/** |
|||
* 身份证正面照 |
|||
*/ |
|||
@ApiModelProperty(value = "身份证正面照") |
|||
private String cardPositive; |
|||
|
|||
/** |
|||
* 身份证反面照 |
|||
*/ |
|||
@ApiModelProperty(value = "身份证反面照") |
|||
private String cardSide; |
|||
|
|||
/** |
|||
* 手持证件照 |
|||
*/ |
|||
@ApiModelProperty(value = "手持证件照") |
|||
private String cardHand; |
|||
|
|||
/** |
|||
* 生效日期 |
|||
*/ |
|||
@ApiModelProperty(value = "生效日期") |
|||
private String effectiveDate; |
|||
|
|||
/** |
|||
* 生效时限(年) |
|||
*/ |
|||
@ApiModelProperty(value = "生效时限(年)") |
|||
private Integer effectiveYear; |
|||
|
|||
/** |
|||
* 主体信息-商户名称 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-商户名称") |
|||
private String subjectName; |
|||
|
|||
/** |
|||
* 主体信息-统一社会信用代码 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-统一社会信用代码") |
|||
private String subjectCode; |
|||
|
|||
/** |
|||
* 主体信息-地址 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-地址") |
|||
private String subjectAdress; |
|||
|
|||
/** |
|||
* 主体信息-详细地址 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-详细地址") |
|||
private String adress; |
|||
|
|||
/** |
|||
* 主体信息-营业期限开始时间 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-营业期限开始时间") |
|||
private String subjectStartTime; |
|||
|
|||
/** |
|||
* 主体信息-营业期限结束时间 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-营业期限结束时间") |
|||
private String subjectEndTime; |
|||
|
|||
/** |
|||
* 主体信息-营业执照图片地址 |
|||
*/ |
|||
@ApiModelProperty(value = "主体信息-营业执照图片地址") |
|||
private List<String> subjectLicense; |
|||
|
|||
/** |
|||
* 是否是跨境商家 |
|||
*/ |
|||
private Integer isCross; |
|||
} |
|||
@ -0,0 +1,39 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.page.business; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 商家列表 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "BusinessGetAll", description = "商家列表") |
|||
public class BusinessGetAll extends CerePlatformBusiness { |
|||
|
|||
/** |
|||
* 商家用户id |
|||
*/ |
|||
@ApiModelProperty(value = "商家用户id") |
|||
private Long businessUserId; |
|||
|
|||
/** |
|||
* 商家账号 |
|||
*/ |
|||
@ApiModelProperty(value = "商家账号") |
|||
private String businessPhone; |
|||
|
|||
/** |
|||
* 商家密码 |
|||
*/ |
|||
@ApiModelProperty(value = "商家密码") |
|||
private String businessPassword; |
|||
|
|||
} |
|||
@ -1,65 +0,0 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.page.product; |
|||
|
|||
import com.shop.cereshop.commons.domain.image.Image; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 商品类别返回数据实体类 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "ProductClassify", description = "商品类别返回数据实体类") |
|||
public class ProductClassify { |
|||
|
|||
/** |
|||
* 一级类别id |
|||
*/ |
|||
@ApiModelProperty(value = "一级类别id") |
|||
private Long id; |
|||
|
|||
/** |
|||
* 类别名称 |
|||
*/ |
|||
@ApiModelProperty(value = "类别名称") |
|||
@NotBlank(message = "类别名称不能为空") |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 类别链接 |
|||
*/ |
|||
@ApiModelProperty(value = "类别链接") |
|||
private Long link; |
|||
|
|||
/** |
|||
* 类别图片地址 |
|||
*/ |
|||
@ApiModelProperty(value = "类别图片地址") |
|||
private String categoryImg; |
|||
|
|||
/** |
|||
* 类别图片地址 |
|||
*/ |
|||
@ApiModelProperty(value = "类别图片地址") |
|||
private List<Image> categoryImgArray; |
|||
|
|||
/** |
|||
* 类别级别 |
|||
*/ |
|||
@ApiModelProperty(value = "类别级别") |
|||
private Integer depth; |
|||
|
|||
/** |
|||
* 子节点数据 |
|||
*/ |
|||
@ApiModelProperty(value = "子节点数据") |
|||
private List<ProductClassify> childs; |
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.param.business; |
|||
|
|||
import com.shop.cereshop.commons.domain.common.PageParam; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 获取商家列表请求 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "BusinessGetAllParam", description = "获取商家列表请求") |
|||
public class BusinessGetAllParam extends PageParam { |
|||
|
|||
|
|||
/** |
|||
* 商家Id |
|||
*/ |
|||
@ApiModelProperty(value = "商家Id") |
|||
private String businessId; |
|||
/** |
|||
* 商家名称 |
|||
*/ |
|||
@ApiModelProperty(value = "商家名称") |
|||
private String businessName; |
|||
|
|||
/** |
|||
* 商家编码 |
|||
*/ |
|||
@ApiModelProperty(value = "商家编码") |
|||
private String businessCode; |
|||
|
|||
/** |
|||
* 商家负责人 |
|||
*/ |
|||
@ApiModelProperty(value = "商家负责人") |
|||
private String chargePersonName; |
|||
|
|||
/** |
|||
* 合同状态 1-有效 0-无效 |
|||
*/ |
|||
@ApiModelProperty(value = "合同状态 1-有效 0-无效") |
|||
private Integer contractState; |
|||
|
|||
/** |
|||
* 商家IdList |
|||
*/ |
|||
@ApiModelProperty(value = "商家IdList") |
|||
private List<Long> businessIdList; |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.param.business; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 获取商家详情请求 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "BusinessGetByIdParam", description = "获取商家详情请求") |
|||
public class BusinessGetByIdParam { |
|||
|
|||
/** |
|||
* 商家id |
|||
*/ |
|||
@ApiModelProperty(value = "商家id") |
|||
private Long businessId; |
|||
} |
|||
@ -0,0 +1,92 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.param.business; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* 添加商家请求 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "BusinessSaveParam", description = "添加商家请求") |
|||
public class BusinessSaveParam { |
|||
|
|||
/** |
|||
* 商家名称 |
|||
*/ |
|||
@ApiModelProperty(value = "商家名称") |
|||
@NotBlank(message = "商家名称不能为空") |
|||
private String businessName; |
|||
|
|||
/** |
|||
* 商家账号 |
|||
*/ |
|||
@ApiModelProperty(value = "商家账号") |
|||
@NotBlank(message = "商家账号不能为空") |
|||
private String businessPhone; |
|||
|
|||
/** |
|||
* 商家密码 |
|||
*/ |
|||
@ApiModelProperty(value = "商家密码") |
|||
@NotBlank(message = "商家密码不能为空") |
|||
private String businessPassword; |
|||
|
|||
/** |
|||
* 商家负责人 |
|||
*/ |
|||
@ApiModelProperty(value = "商家负责人") |
|||
@NotBlank(message = "商家负责人不能为空") |
|||
private String chargePersonName; |
|||
|
|||
/** |
|||
* 负责人电话 |
|||
*/ |
|||
@ApiModelProperty(value = "负责人电话") |
|||
@NotBlank(message = "负责人电话不能为空") |
|||
private String chargePersonPhone; |
|||
|
|||
/** |
|||
* 商家地址 |
|||
*/ |
|||
@ApiModelProperty(value = "商家地址") |
|||
@NotBlank(message = "商家地址不能为空") |
|||
private String businessAdress; |
|||
|
|||
/** |
|||
* 生效日期 |
|||
*/ |
|||
@ApiModelProperty(value = "生效日期") |
|||
private String effectiveDate; |
|||
|
|||
/** |
|||
* 生效时限(年) |
|||
*/ |
|||
@ApiModelProperty(value = "生效时限(年)") |
|||
private Integer effectiveYear; |
|||
|
|||
/** |
|||
* 合同状态 1-有效 0-无效 |
|||
*/ |
|||
@ApiModelProperty(value = "合同状态 1-有效 0-无效") |
|||
private Integer contractState; |
|||
|
|||
/** |
|||
* 审核直播间 |
|||
*/ |
|||
@ApiModelProperty(value = "审核直播间 1-开启 0-关闭") |
|||
private Integer auditLive; |
|||
|
|||
/** |
|||
* 审核直播间商品 |
|||
*/ |
|||
@ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") |
|||
private Integer auditLiveProduct; |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.param.business; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 启停用商家请求 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "BusinessStartParam", description = "启停用商家请求") |
|||
public class BusinessStartParam { |
|||
|
|||
/** |
|||
* 商家id |
|||
*/ |
|||
@ApiModelProperty(value = "商家id") |
|||
private Long businessId; |
|||
|
|||
/** |
|||
* 是否启用 1-是 0-否 |
|||
*/ |
|||
@ApiModelProperty(value = "是否启用 1-是 0-否") |
|||
private Integer state; |
|||
} |
|||
@ -0,0 +1,96 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.param.business; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 更新商家请求 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "BusinessUpdateParam", description = "更新商家请求") |
|||
public class BusinessUpdateParam { |
|||
|
|||
/** |
|||
* 商家用户id |
|||
*/ |
|||
@ApiModelProperty(value = "商家用户id") |
|||
private Long businessUserId; |
|||
|
|||
/** |
|||
* 商家id |
|||
*/ |
|||
@ApiModelProperty(value = "商家id") |
|||
private Long businessId; |
|||
|
|||
/** |
|||
* 商家名称 |
|||
*/ |
|||
@ApiModelProperty(value = "商家名称") |
|||
private String businessName; |
|||
|
|||
/** |
|||
* 商家账号 |
|||
*/ |
|||
@ApiModelProperty(value = "商家账号") |
|||
private String businessPhone; |
|||
|
|||
/** |
|||
* 商家密码 |
|||
*/ |
|||
@ApiModelProperty(value = "商家密码") |
|||
private String businessPassword; |
|||
|
|||
/** |
|||
* 商家负责人 |
|||
*/ |
|||
@ApiModelProperty(value = "商家负责人") |
|||
private String chargePersonName; |
|||
|
|||
/** |
|||
* 负责人电话 |
|||
*/ |
|||
@ApiModelProperty(value = "负责人电话") |
|||
private String chargePersonPhone; |
|||
|
|||
/** |
|||
* 商家地址 |
|||
*/ |
|||
@ApiModelProperty(value = "商家地址") |
|||
private String businessAdress; |
|||
|
|||
/** |
|||
* 生效日期 |
|||
*/ |
|||
@ApiModelProperty(value = "生效日期") |
|||
private String effectiveDate; |
|||
|
|||
/** |
|||
* 生效时限(年) |
|||
*/ |
|||
@ApiModelProperty(value = "生效时限(年)") |
|||
private Integer effectiveYear; |
|||
|
|||
/** |
|||
* 合同状态 1-有效 0-无效 |
|||
*/ |
|||
@ApiModelProperty(value = "合同状态 1-有效 0-无效") |
|||
private Integer contractState; |
|||
|
|||
/** |
|||
* 审核直播间 |
|||
*/ |
|||
@ApiModelProperty(value = "审核直播间 1-开启 0-关闭") |
|||
private Integer auditLive; |
|||
|
|||
/** |
|||
* 审核直播间商品 |
|||
*/ |
|||
@ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") |
|||
private Integer auditLiveProduct; |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.service.business; |
|||
|
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
|
|||
public interface CerePlatformBusinessUserService { |
|||
void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; |
|||
|
|||
void update(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; |
|||
|
|||
CerePlatformBusinessUser findByPhone(String chargePersonPhone); |
|||
|
|||
CerePlatformBusinessUser findByUserName(String username); |
|||
|
|||
CerePlatformBusinessUser checkPhone(String phone, Long businessUserId); |
|||
|
|||
CerePlatformBusinessUser checkUserName(String username, Long businessUserId); |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.admin.service.business.impl; |
|||
|
|||
import com.shop.cereshop.admin.dao.business.CerePlatformBusinessUserDAO; |
|||
import com.shop.cereshop.admin.service.business.CerePlatformBusinessUserService; |
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class CerePlatformBusinessUserServiceImpl implements CerePlatformBusinessUserService { |
|||
|
|||
@Autowired |
|||
private CerePlatformBusinessUserDAO cerePlatformBusinessUserDAO; |
|||
|
|||
@Override |
|||
public void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { |
|||
cerePlatformBusinessUserDAO.insert(cerePlatformBusinessUser); |
|||
} |
|||
|
|||
@Override |
|||
public void update(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { |
|||
cerePlatformBusinessUserDAO.updateByPrimaryKeySelective(cerePlatformBusinessUser); |
|||
} |
|||
|
|||
@Override |
|||
public CerePlatformBusinessUser findByPhone(String phone) { |
|||
return cerePlatformBusinessUserDAO.findByPhone(phone); |
|||
} |
|||
@Override |
|||
public CerePlatformBusinessUser findByUserName(String username) { |
|||
return cerePlatformBusinessUserDAO.findByUserName(username); |
|||
} |
|||
|
|||
@Override |
|||
public CerePlatformBusinessUser checkPhone(String phone, Long businessUserId) { |
|||
return cerePlatformBusinessUserDAO.checkPhone(phone, businessUserId); |
|||
} |
|||
@Override |
|||
public CerePlatformBusinessUser checkUserName(String username, Long businessUserId) { |
|||
return cerePlatformBusinessUserDAO.checkUserName(username, businessUserId); |
|||
} |
|||
} |
|||
@ -1,37 +1,45 @@ |
|||
<?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"> |
|||
<mapper namespace="com.shop.cereshop.admin.dao.business.CereBusinessShopDAO"> |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.business.CereBusinessShop"> |
|||
<mapper namespace="com.shop.cereshop.admin.dao.business.CereBusinessUserDAO"> |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.business.CereBusinessUser"> |
|||
<result column="business_user_id" jdbcType="BIGINT" property="businessUserId" /> |
|||
<result column="shop_id" jdbcType="BIGINT" property="shopId" /> |
|||
<result column="business_id" jdbcType="BIGINT" property="businessId" /> |
|||
<result column="if_binding" jdbcType="BIT" property="ifBinding" /> |
|||
<result column="is_main_user" jdbcType="BIT" property="isMainUser" /> |
|||
</resultMap> |
|||
<insert id="insertSelective" parameterType="com.shop.cereshop.commons.domain.business.CereBusinessShop"> |
|||
insert into cere_business_shop |
|||
<insert id="insertSelective" parameterType="com.shop.cereshop.commons.domain.business.CereBusinessUser"> |
|||
insert into cere_business_user |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="businessUserId != null"> |
|||
business_user_id, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
shop_id, |
|||
<if test="businessId != null"> |
|||
business_id, |
|||
</if> |
|||
<if test="ifBinding != null"> |
|||
if_binding, |
|||
</if> |
|||
<if test="isMainUser != null"> |
|||
is_main_user, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="businessUserId != null"> |
|||
#{businessUserId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="shopId != null"> |
|||
#{shopId,jdbcType=BIGINT}, |
|||
<if test="businessId != null"> |
|||
#{businessId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="ifBinding != null"> |
|||
#{ifBinding,jdbcType=BIT}, |
|||
</if> |
|||
<if test="isMainUser != null"> |
|||
#{isMainUser,jdbcType=BIT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<select id="selectAllProject" resultType="java.lang.Long"> |
|||
select shop_id from cere_platform_shop where check_state = 1 |
|||
select business_id from cere_platform_business where check_state = 1 |
|||
</select> |
|||
</mapper> |
|||
@ -1,153 +1,479 @@ |
|||
<?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"> |
|||
<mapper namespace="com.shop.cereshop.admin.dao.business.CerePlatformBusinessDAO"> |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
<id column="business_user_id" jdbcType="BIGINT" property="businessUserId" /> |
|||
<result column="username" jdbcType="VARCHAR" property="username" /> |
|||
<result column="password" jdbcType="VARCHAR" property="password" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="sex" jdbcType="VARCHAR" property="sex" /> |
|||
<result column="email" jdbcType="VARCHAR" property="email" /> |
|||
<result column="token" jdbcType="VARCHAR" property="token" /> |
|||
<result column="state" jdbcType="BIT" property="state" /> |
|||
<result column="create_time" jdbcType="VARCHAR" property="createTime" /> |
|||
<result column="update_time" jdbcType="VARCHAR" property="updateTime" /> |
|||
</resultMap> |
|||
<sql id="Base_Column_List"> |
|||
business_user_id, username, `password`, `name`, sex, email,token, `state`, create_time, |
|||
update_time |
|||
</sql> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from cere_platform_business |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
</select> |
|||
<select id="findProjectByUsername" resultType="java.lang.Long"> |
|||
SELECT |
|||
cbs.shop_id |
|||
FROM |
|||
cere_business_shop cbs |
|||
JOIN cere_platform_business cpb ON cpb.business_user_id = cbs.business_user_id |
|||
where |
|||
cpb.username = #{username} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from cere_platform_business |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
<id column="business_id" jdbcType="BIGINT" property="businessId" /> |
|||
<result column="business_code" jdbcType="VARCHAR" property="businessCode" /> |
|||
<result column="business_name" jdbcType="VARCHAR" property="businessName" /> |
|||
<result column="business_brief" jdbcType="VARCHAR" property="businessBrief" /> |
|||
<result column="business_phone" jdbcType="VARCHAR" property="businessPhone" /> |
|||
<result column="charge_person_name" jdbcType="VARCHAR" property="chargePersonName" /> |
|||
<result column="charge_person_phone" jdbcType="VARCHAR" property="chargePersonPhone" /> |
|||
<result column="business_adress_province" jdbcType="VARCHAR" property="businessAdressProvince" /> |
|||
<result column="business_adress_city" jdbcType="VARCHAR" property="businessAdressCity" /> |
|||
<result column="business_adress_detail" jdbcType="VARCHAR" property="businessAdressDetail" /> |
|||
<result column="business_adress" jdbcType="VARCHAR" property="businessAdress" /> |
|||
<result column="business_logo" jdbcType="VARCHAR" property="businessLogo" /> |
|||
<result column="effective_date" jdbcType="VARCHAR" property="effectiveDate" /> |
|||
<result column="effective_year" jdbcType="INTEGER" property="effectiveYear" /> |
|||
<result column="contract_state" jdbcType="BIT" property="contractState" /> |
|||
<result column="authentication_state" jdbcType="BIT" property="authenticationState" /> |
|||
<result column="check_state" jdbcType="BIT" property="checkState" /> |
|||
<result column="state" jdbcType="BIT" property="state" /> |
|||
<result column="authen_type" jdbcType="BIT" property="authenType" /> |
|||
<result column="wx_image" jdbcType="VARCHAR" property="wxImage" /> |
|||
<result column="ailpay_image" jdbcType="VARCHAR" property="ailpayImage" /> |
|||
<result column="create_time" jdbcType="VARCHAR" property="createTime" /> |
|||
<result column="update_time" jdbcType="VARCHAR" property="updateTime" /> |
|||
<result column="xs_pay_id" jdbcType="VARCHAR" property="xsPayId" /> |
|||
<result column="share_days" jdbcType="INTEGER" property="shareDays" /> |
|||
</resultMap> |
|||
<sql id="Base_Column_List"> |
|||
business_id, business_code, business_name, business_brief, business_phone, charge_person_name, |
|||
charge_person_phone, business_adress_province, business_adress_city, business_adress_detail, business_adress, |
|||
business_logo, effective_date, effective_year, contract_state, |
|||
authentication_state, check_state, `state`,authen_type,wx_image,ailpay_image, create_time, update_time, xs_pay_id, share_days |
|||
</sql> |
|||
|
|||
<!-- 删除店铺功能,待整理 --> |
|||
<delete id="cleanShop"> |
|||
delete from cere_platform_business where business_id = #{shopId}; |
|||
|
|||
delete from cere_platform_shop where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_sign_product a |
|||
join cere_activity_sign b on b.sign_id = a.sign_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_activity_sign where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_after_dilever a join |
|||
cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_after_product_attribute a |
|||
join cere_after_product b on b.after_product_id = a.after_product_id |
|||
join cere_shop_product c on c.product_id = b.product_id and c.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_after_product a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_business_buyer_user where shop_id = #{shopId}; |
|||
|
|||
delete from cere_business_shop where shop_id = #{shopId}; |
|||
|
|||
delete from cere_buyer_collect where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_buyer_comment_like a |
|||
join cere_shop_comment b on b.comment_id = a.comment_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_buyer_discount_visit a |
|||
join cere_shop_discount b on b.shop_discount_id = a.shop_discount_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_buyer_footprint where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_buyer_polite_record a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_buyer_seckill_visit a |
|||
join cere_shop_seckill b on b.shop_seckill_id = a.shop_seckill_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_buyer_shop_coupon a |
|||
join cere_shop_coupon b on b.shop_coupon_id = a.shop_coupon_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_buyer_shop_label a |
|||
join cere_shop_label b on b.label_id = a.label_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_channel_coupon where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_collage_order a |
|||
join cere_shop_group_work b on b.shop_group_work_id = a.shop_group_work_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_group_work a |
|||
join cere_shop_group_work b on b.shop_group_work_id = a.shop_group_work_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_comment_word a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_group_work where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_compose_product a |
|||
join cere_shop_compose b on b.compose_id = a.compose_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_customer_service_config where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_distribution_order a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_distributor_buyer where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_label_attribute a |
|||
join cere_shop_label b on b.label_id = a.label_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_label_source a |
|||
join cere_shop_label b on b.label_id = a.label_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_label where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_live_examine a |
|||
join cere_live b on a.live_id = b.id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_live_product_examine a |
|||
join cere_live_product b on b.id = a.live_product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_live_product_rel a |
|||
join cere_live_product b on b.id = a.live_product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_live_sale_stat a |
|||
join cere_live_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
|
|||
delete a from cere_logistics_charge a |
|||
join cere_order_logistics b on b.logistics_id = a.logistics_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_order_after a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_order_dilever a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_order_logistics where shop_id = #{shopId}; |
|||
|
|||
delete from cere_pay_log where shop_id = #{shopId}; |
|||
|
|||
delete from cere_live_product where shop_id = #{shopId}; |
|||
|
|||
delete from cere_live where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_platform_after a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
|
|||
delete a from cere_platform_business a |
|||
join cere_business_shop b on b.business_user_id = a.business_user_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_business_user_role a |
|||
join cere_business_shop b on b.business_user_id = a.business_user_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_platform_role_permission a |
|||
join cere_platform_role b on b.role_id = a.role_id and b.project = #{shopId}; |
|||
|
|||
delete from cere_platform_permission where project = #{shopId}; |
|||
|
|||
delete from cere_platform_role where project = #{shopId}; |
|||
|
|||
delete from cere_platform_shop where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_price_rule a |
|||
join cere_shop_price b on b.price_id = a.price_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_price_product a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
|
|||
delete from cere_shop_price where shop_id = #{shopId}; |
|||
|
|||
delete from cere_privacy_verify_setting where project = #{shopId}; |
|||
|
|||
delete a from cere_product_answer a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_product_image a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_product_member a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_product_problem a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_sku_name a |
|||
join cere_product_sku b on b.sku_id = a.sku_id |
|||
join cere_shop_product c on c.product_id = b.product_id and c.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_product_sku a |
|||
join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_bank where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_banner where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_check where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_comment where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_compose where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_conversion where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_coupon_detail a |
|||
join cere_shop_coupon b on b.shop_coupon_id = a.shop_coupon_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_discount_detail a |
|||
join cere_shop_discount b on b.shop_discount_id = a.shop_discount_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_crowd where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_discount where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_distribution_level where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_distributor where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_enterprise where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_extension where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_group_detail a |
|||
join cere_shop_group b on b.shop_group_id = a.shop_group_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_group where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_group_work_detail a |
|||
join cere_shop_group_work b on b.shop_group_work_id = a.shop_group_work_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_enterprise where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_individual_businesses where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_operate_detail a |
|||
join cere_shop_operate b on b.shop_operate_id = a.shop_operate_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_operate where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_other_organizations where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_personal where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_product where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_recruit where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_relationship where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_return where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_scene_member_coupon a |
|||
join cere_shop_scene b on b.scene_id = a.scene_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_scene_member a |
|||
join cere_shop_scene b on b.scene_id = a.scene_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_scene where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_shop_seckill_detail a |
|||
join cere_shop_seckill b on b.shop_seckill_id = a.shop_seckill_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_seckill where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_user_label where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_visit where shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_withdrawal where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_order_reconciliation a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_order_product_attribute a |
|||
join cere_order_product b on b.order_product_id = a.order_product_id |
|||
join cere_shop_order c on c.order_id = b.order_id and c.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_order_product a |
|||
join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete a from cere_order_return a |
|||
join cere_shop_order b on a.order_id = b.order_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_order where shop_id = #{shopId}; |
|||
|
|||
delete a from cere_cart_attribute a |
|||
join cere_shop_cart b on b.cart_id = a.cart_id and b.shop_id = #{shopId}; |
|||
|
|||
delete from cere_shop_cart where shop_id = #{shopId}; |
|||
</delete> |
|||
<insert id="insertSelective" keyColumn="business_user_id" keyProperty="businessUserId" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness" useGeneratedKeys="true"> |
|||
insert into cere_platform_business |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="username != null and username!=''"> |
|||
username, |
|||
</if> |
|||
<if test="password != null and password!=''"> |
|||
`password`, |
|||
</if> |
|||
<if test="name != null and name!=''"> |
|||
`name`, |
|||
</if> |
|||
<if test="sex != null and sex!=''"> |
|||
sex, |
|||
</if> |
|||
<if test="email != null and email!=''"> |
|||
email, |
|||
</if> |
|||
<if test="token != null and token!=''"> |
|||
token, |
|||
</if> |
|||
<if test="state != null"> |
|||
`state`, |
|||
</if> |
|||
<if test="createTime != null and createTime!=''"> |
|||
create_time, |
|||
</if> |
|||
<if test="updateTime != null and updateTime!=''"> |
|||
update_time, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="username != null and username!=''"> |
|||
#{username,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="password != null and password!=''"> |
|||
#{password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null and name!=''"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="sex != null and sex!=''"> |
|||
#{sex,jdbcType=VARCHAR}, |
|||
|
|||
<select id="findByBusinessName" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
SELECT business_id FROM cere_platform_business where business_name=#{businessName} |
|||
</select> |
|||
|
|||
<select id="findByBusinessPhone" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
SELECT business_id FROM cere_platform_business where business_phone=#{businessPhone} |
|||
</select> |
|||
|
|||
<select id="checkBusinessIdByName" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
SELECT business_id FROM cere_platform_business where business_name=#{businessName} and business_id<![CDATA[!= ]]>#{businessId} |
|||
</select> |
|||
|
|||
<select id="checkBusinessIdByPhone" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
SELECT business_id FROM cere_platform_business where business_phone=#{businessPhone} and business_id<![CDATA[!= ]]>#{businessId} |
|||
</select> |
|||
|
|||
<select id="findBusinessUserByBusinessId" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser"> |
|||
SELECT a.business_user_id from cere_platform_business_user a |
|||
LEFT JOIN cere_business_user b ON a.business_user_id=b.business_user_id |
|||
LEFT JOIN cere_platform_business c ON b.business_id=c.business_id |
|||
where c.business_id=#{businessId} |
|||
</select> |
|||
|
|||
<sql id="selectBusinessCommonSql"> |
|||
SELECT a.business_id, a.business_code, a.business_name, a.business_brief, a.business_phone, a.charge_person_name, |
|||
a.charge_person_phone, a.business_adress, a.effective_date, a.effective_year, a.contract_state, |
|||
a.authentication_state, a.check_state, a.`state`, a.authen_type, a.create_time, a.update_time, |
|||
a.audit_live, a.audit_live_product, |
|||
b.business_user_id, c.password businessPassword |
|||
FROM cere_platform_business a |
|||
INNER JOIN cere_business_user b ON a.business_id = b.business_id AND b.is_main_user = 1 |
|||
INNER JOIN cere_platform_business_user c ON b.business_user_id = c.business_user_id |
|||
</sql> |
|||
|
|||
<select id="getById" parameterType="java.lang.Object" resultType="com.shop.cereshop.admin.page.business.BusinessGetAll"> |
|||
<include refid="selectBusinessCommonSql"/> |
|||
where a.business_id = #{businessId} |
|||
</select> |
|||
|
|||
<select id="getAll" parameterType="com.shop.cereshop.admin.param.business.BusinessGetAllParam" resultType="com.shop.cereshop.admin.page.business.BusinessGetAll"> |
|||
<include refid="selectBusinessCommonSql"/> |
|||
where 1=1 |
|||
<if test="businessId!=null"> |
|||
and a.business_id = #{businessId} |
|||
</if> |
|||
<if test="email != null and email!=''"> |
|||
#{email,jdbcType=VARCHAR}, |
|||
<if test="businessName!=null and businessName!=''"> |
|||
and a.business_name like concat('%',#{businessName},'%') |
|||
</if> |
|||
<if test="businessCode!=null and businessCode!=''"> |
|||
and a.business_code like concat('%',#{businessCode},'%') |
|||
</if> |
|||
<if test="chargePersonName!=null and chargePersonName!=''"> |
|||
and a.charge_person_name like concat('%',#{chargePersonName},'%') |
|||
</if> |
|||
<if test="contractState!=null"> |
|||
and a.contract_state=#{contractState} |
|||
</if> |
|||
<if test="businessIdList!=null and businessIdList.size()>0"> |
|||
and a.business_id in ( |
|||
<foreach collection="businessIdList" item="id" index="index" separator=","> |
|||
#{id} |
|||
</foreach> |
|||
) |
|||
</if> |
|||
<if test="token != null and token!=''"> |
|||
#{token,jdbcType=VARCHAR}, |
|||
order by a.create_time desc |
|||
</select> |
|||
|
|||
<select id="findBusiness" resultType="com.shop.cereshop.admin.page.business.Business"> |
|||
SELECT business_id,business_logo,business_name, business_phone, business_adress,business_brief,authen_type, |
|||
authentication_state,check_state,effective_date,effective_year,charge_person_name,charge_person_phone |
|||
FROM cere_platform_business where business_id = #{businessId} |
|||
</select> |
|||
|
|||
<update id="updateDate" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
update cere_platform_business |
|||
<set> |
|||
<if test="effectiveDate != null and effectiveDate!=''"> |
|||
effective_date = #{effectiveDate,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="state != null"> |
|||
#{state,jdbcType=BIT}, |
|||
<if test="effectiveYear != null"> |
|||
effective_year = #{effectiveYear,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="createTime != null and createTime!=''"> |
|||
#{createTime,jdbcType=VARCHAR}, |
|||
<if test="checkState != null"> |
|||
check_state = #{checkState,jdbcType=BIT}, |
|||
</if> |
|||
<if test="updateTime != null and updateTime!=''"> |
|||
#{updateTime,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
</set> |
|||
where business_id = #{businessId,jdbcType=BIGINT} |
|||
</update> |
|||
|
|||
<update id="updateBusinessStop" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
update cere_platform_business |
|||
<set> |
|||
<if test="username != null and username!=''"> |
|||
username = #{username,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="password != null and password!=''"> |
|||
`password` = #{password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null and name!=''"> |
|||
`name` = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="sex != null and sex!=''"> |
|||
sex = #{sex,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="email != null and email!=''"> |
|||
email = #{email,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="token != null and token!=''"> |
|||
token = #{token,jdbcType=VARCHAR}, |
|||
<if test="contractState != null"> |
|||
contract_state = #{contractState,jdbcType=BIT}, |
|||
</if> |
|||
<if test="state != null"> |
|||
`state` = #{state,jdbcType=BIT}, |
|||
</if> |
|||
<if test="createTime != null and createTime!=''"> |
|||
create_time = #{createTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null and updateTime!=''"> |
|||
update_time = #{updateTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
update cere_platform_business |
|||
set username = #{username,jdbcType=VARCHAR}, |
|||
`password` = #{password,jdbcType=VARCHAR}, |
|||
`name` = #{name,jdbcType=VARCHAR}, |
|||
sex = #{sex,jdbcType=VARCHAR}, |
|||
email = #{email,jdbcType=VARCHAR}, |
|||
token = #{token,jdbcType=VARCHAR}, |
|||
`state` = #{state,jdbcType=BIT}, |
|||
create_time = #{createTime,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=VARCHAR} |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
where business_id = #{businessId,jdbcType=BIGINT} |
|||
</update> |
|||
|
|||
<select id="findByPhone" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from cere_platform_business |
|||
where phone = #{phone} |
|||
<select id="getAllFinance" parameterType="com.shop.cereshop.admin.param.finance.FinanceParam" resultType="com.shop.cereshop.admin.page.finance.Finance"> |
|||
SELECT a.business_id,a.business_name,a.business_code,ifnull(b.revenue, 0) as revenue from cere_platform_business a |
|||
LEFT JOIN (SELECT SUM(cso.price) revenue,cps.MAX(business_id),cso.state from cere_shop_order cso |
|||
INNER JOIN cere_platform_shop cps ON cso.shop_id = cps.shop_id where cso.state in (2,3,4) GROUP BY cso.shop_id) b ON a.business_id=b.business_id |
|||
where 1=1 |
|||
<if test="businessName!=null and businessName!=''"> |
|||
and a.business_name like concat('%',#{businessName},'%') |
|||
</if> |
|||
<if test="businessCode!=null and businessCode!=''"> |
|||
and a.business_code like concat('%',#{businessCode},'%') |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="finFrozen" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(price) IS NULL,0,SUM(price)) FROM cere_shop_order where state in (2,3) |
|||
<if test="businessId!=null"> |
|||
and business_id=#{businessId} |
|||
</if> |
|||
AND project IS NULL |
|||
</select> |
|||
|
|||
<select id="findHaveWithdrawal" parameterType="java.lang.Object" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(withdrawal_money) IS NULL,0,SUM(withdrawal_money)) FROM cere_shop_withdrawal |
|||
where state=1 |
|||
<if test="shopId!=null"> |
|||
and shop_id=#{shopId} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findRefund" parameterType="java.lang.Object" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(money) IS NULL,0,SUM(money)) FROM cere_order_reconciliation a |
|||
LEFT JOIN cere_shop_order b ON a.order_id=b.order_id |
|||
where a.type=2 |
|||
<if test="shopId!=null"> |
|||
and b.shop_id=#{shopId} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findRevenue" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(price) IS NULL,0,SUM(price)) FROM cere_shop_order where state in (2,3,4) |
|||
</select> |
|||
|
|||
<select id="getAllWithdrawableMoney" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(price) IS NULL,0,SUM(price)) FROM cere_shop_order where state=4 |
|||
</select> |
|||
|
|||
<select id="getWithdrawableStayMoney" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(withdrawal_money) IS NULL,0,SUM(withdrawal_money)) FROM cere_shop_withdrawal |
|||
where state=0 |
|||
</select> |
|||
|
|||
<select id="findBusinessUserId" resultType="java.lang.Long"> |
|||
SELECT a.business_user_id FROM cere_platform_business_user a |
|||
LEFT JOIN cere_business_user b ON a.business_user_id=b.business_user_id AND b.is_main_user = 1 |
|||
LEFT JOIN cere_platform_business c ON b.business_id=c.business_id |
|||
where c.business_id=#{businessId} |
|||
</select> |
|||
|
|||
<select id="findAll" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusiness"> |
|||
SELECT * FROM cere_platform_business where check_state=1 and state=1 |
|||
</select> |
|||
|
|||
<select id="findWithdrawing" resultType="java.math.BigDecimal"> |
|||
SELECT IF(SUM(withdrawal_money) IS NULL,0,SUM(withdrawal_money)) FROM cere_shop_withdrawal |
|||
where shop_id = #{shopId} and state = 0 |
|||
</select> |
|||
|
|||
<select id="getByIdList" parameterType="java.util.List" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from cere_platform_business |
|||
where business_id in ( |
|||
<foreach collection="businessIdList" item="businessId" index="index" separator=","> |
|||
#{businessId} |
|||
</foreach> |
|||
) |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,176 @@ |
|||
<?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"> |
|||
<mapper namespace="com.shop.cereshop.admin.dao.business.CerePlatformBusinessUserDAO"> |
|||
<resultMap id="BaseResultMap" type="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser"> |
|||
<id column="business_user_id" jdbcType="BIGINT" property="businessUserId" /> |
|||
<result column="username" jdbcType="VARCHAR" property="username" /> |
|||
<result column="password" jdbcType="VARCHAR" property="password" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="sex" jdbcType="VARCHAR" property="sex" /> |
|||
<result column="email" jdbcType="VARCHAR" property="email" /> |
|||
<result column="token" jdbcType="VARCHAR" property="token" /> |
|||
<result column="state" jdbcType="BIT" property="state" /> |
|||
<result column="create_time" jdbcType="VARCHAR" property="createTime" /> |
|||
<result column="update_time" jdbcType="VARCHAR" property="updateTime" /> |
|||
</resultMap> |
|||
<sql id="Base_Column_List"> |
|||
business_user_id, username, `password`, `name`, sex, email,token, `state`, create_time, |
|||
update_time |
|||
</sql> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from cere_platform_business_user |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
</select> |
|||
|
|||
<select id="findBusinessByUsername" resultType="java.lang.Long"> |
|||
SELECT |
|||
cbu.business_id |
|||
FROM |
|||
cere_business_user cbu |
|||
INNER JOIN cere_platform_business_user cpbu ON cpbu.business_user_id = cbu.business_user_id |
|||
where |
|||
cpbu.username = #{username} |
|||
</select> |
|||
|
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from cere_platform_business_user |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
</delete> |
|||
<insert id="insertSelective" keyColumn="business_user_id" keyProperty="businessUserId" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser" useGeneratedKeys="true"> |
|||
insert into cere_platform_business_user |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="username != null and username!=''"> |
|||
username, |
|||
</if> |
|||
<if test="password != null and password!=''"> |
|||
`password`, |
|||
</if> |
|||
<if test="name != null and name!=''"> |
|||
`name`, |
|||
</if> |
|||
<if test="sex != null and sex!=''"> |
|||
sex, |
|||
</if> |
|||
<if test="email != null and email!=''"> |
|||
email, |
|||
</if> |
|||
<if test="token != null and token!=''"> |
|||
token, |
|||
</if> |
|||
<if test="state != null"> |
|||
`state`, |
|||
</if> |
|||
<if test="createTime != null and createTime!=''"> |
|||
create_time, |
|||
</if> |
|||
<if test="updateTime != null and updateTime!=''"> |
|||
update_time, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="username != null and username!=''"> |
|||
#{username,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="password != null and password!=''"> |
|||
#{password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null and name!=''"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="sex != null and sex!=''"> |
|||
#{sex,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="email != null and email!=''"> |
|||
#{email,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="token != null and token!=''"> |
|||
#{token,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="state != null"> |
|||
#{state,jdbcType=BIT}, |
|||
</if> |
|||
<if test="createTime != null and createTime!=''"> |
|||
#{createTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null and updateTime!=''"> |
|||
#{updateTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser"> |
|||
update cere_platform_business_user |
|||
<set> |
|||
<if test="username != null and username!=''"> |
|||
username = #{username,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="password != null and password!=''"> |
|||
`password` = #{password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null and name!=''"> |
|||
`name` = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="sex != null and sex!=''"> |
|||
sex = #{sex,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="email != null and email!=''"> |
|||
email = #{email,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="token != null and token!=''"> |
|||
token = #{token,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="state != null"> |
|||
`state` = #{state,jdbcType=BIT}, |
|||
</if> |
|||
<if test="createTime != null and createTime!=''"> |
|||
create_time = #{createTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null and updateTime!=''"> |
|||
update_time = #{updateTime,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser"> |
|||
update cere_platform_business_user |
|||
set username = #{username,jdbcType=VARCHAR}, |
|||
`password` = #{password,jdbcType=VARCHAR}, |
|||
`name` = #{name,jdbcType=VARCHAR}, |
|||
sex = #{sex,jdbcType=VARCHAR}, |
|||
email = #{email,jdbcType=VARCHAR}, |
|||
token = #{token,jdbcType=VARCHAR}, |
|||
`state` = #{state,jdbcType=BIT}, |
|||
create_time = #{createTime,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=VARCHAR} |
|||
where business_user_id = #{businessUserId,jdbcType=BIGINT} |
|||
</update> |
|||
|
|||
<select id="findByPhone" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from cere_platform_business_user |
|||
where phone = #{phone} |
|||
</select> |
|||
|
|||
<select id="findByUserName" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from cere_platform_business_user |
|||
where username = #{username} |
|||
</select> |
|||
|
|||
<select id="checkUserName" parameterType="java.lang.Object" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser"> |
|||
SELECT business_user_id FROM cere_platform_business_user where username=#{username} |
|||
<if test="businessUserId!=null"> |
|||
and business_user_id<![CDATA[!= ]]>#{businessUserId} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="checkPhone" resultType="com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser"> |
|||
SELECT business_user_id FROM cere_platform_business_user where phone = #{phone} |
|||
<if test="businessUserId!=null"> |
|||
and business_user_id<![CDATA[!= ]]>#{businessUserId} |
|||
</if> |
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,28 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.app.dao.business; |
|||
|
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
@Mapper |
|||
public interface CerePlatformBusinessUserDAO extends BaseMapper<CerePlatformBusinessUser> { |
|||
int deleteByPrimaryKey(Long businessUserId); |
|||
|
|||
int insertSelective(CerePlatformBusinessUser record); |
|||
|
|||
CerePlatformBusinessUser selectByPrimaryKey(Long businessUserId); |
|||
|
|||
int updateByPrimaryKeySelective(CerePlatformBusinessUser record); |
|||
|
|||
int updateByPrimaryKey(CerePlatformBusinessUser record); |
|||
|
|||
CerePlatformBusinessUser checkUserName(@Param("shopPhone") String shopPhone); |
|||
|
|||
CerePlatformBusinessUser checkPhone(String phone); |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.app.dao.shop; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.shop.cereshop.commons.domain.shop.CereShopCheck; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CereShopCheckDAO extends BaseMapper<CereShopCheck> { |
|||
|
|||
int insertSelective(CereShopCheck record); |
|||
|
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.app.page.index; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 首页类目数据 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "ProductClassify", description = "首页类目数据") |
|||
public class ProductClassify { |
|||
|
|||
/** |
|||
* 分类id |
|||
*/ |
|||
@ApiModelProperty(value = "分类id") |
|||
private Long classifyId; |
|||
|
|||
/** |
|||
* 分类名称 |
|||
*/ |
|||
@ApiModelProperty(value = "分类名称") |
|||
private String classifyName; |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.app.service.business; |
|||
|
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
|
|||
public interface CerePlatformBusinessUserService { |
|||
void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; |
|||
|
|||
CerePlatformBusinessUser checkUserName(String shopPhone); |
|||
|
|||
CerePlatformBusinessUser checkPhone(String phone); |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
/* |
|||
* Copyright (C) 2017-2021 |
|||
* All rights reserved, Designed By 深圳中科鑫智科技有限公司 |
|||
* Copyright authorization contact 18814114118 |
|||
*/ |
|||
package com.shop.cereshop.app.service.business.impl; |
|||
|
|||
import com.shop.cereshop.app.dao.business.CerePlatformBusinessUserDAO; |
|||
import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; |
|||
import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; |
|||
import com.shop.cereshop.commons.exception.CoBusinessException; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class CerePlatformBusinessUserServiceImpl implements CerePlatformBusinessUserService { |
|||
|
|||
@Autowired |
|||
private CerePlatformBusinessUserDAO cerePlatformBusinessUserDAO; |
|||
|
|||
@Override |
|||
public void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { |
|||
cerePlatformBusinessUserDAO.insert(cerePlatformBusinessUser); |
|||
} |
|||
|
|||
@Override |
|||
public CerePlatformBusinessUser checkUserName(String shopPhone) { |
|||
return cerePlatformBusinessUserDAO.checkUserName(shopPhone); |
|||
} |
|||
|
|||
@Override |
|||
public CerePlatformBusinessUser checkPhone(String phone) { |
|||
return cerePlatformBusinessUserDAO.checkPhone(phone); |
|||
} |
|||
} |
|||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue