puhanshu
2021-12-28 44b053051033a2d6dd23ad994d3d82a34f42cec1
微商业街基础代码提交
5个文件已修改
53个文件已添加
2077 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/MicroCommercialStreetApi.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/microCommercialStreet/McsMerchantDTO.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsConfigDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsCouponDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsEvaluateDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsGameDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsInformationDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsLabelDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsMerchantDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsProductDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsProductLabelDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsVerifiedRecordDAO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsConfig.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsCoupon.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsEvaluate.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsGame.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsInformation.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsLabel.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsMerchant.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsProduct.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsProductLabel.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsVerifiedRecord.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsConfigService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsCouponService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsEvaluateService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsGameService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsInformationService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsLabelService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsMerchantService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsProductLabelService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsProductService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsVerifiedRecordService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsConfigServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsCouponServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsEvaluateServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsLabelServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsProductLabelServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsProductServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsVerifiedRecordServiceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsConfigMapper.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsCouponMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsEvaluateMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsGameMapper.xml 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsInformationMapper.xml 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsLabelMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsMerchantMapper.xml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsProductLabelMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsProductMapper.xml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsVerifiedRecordMapper.xml 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/MicroCommercialStreetApi.java
New file
@@ -0,0 +1,43 @@
package com.panzhihua.applets_backstage.api;
import javax.annotation.Resource;
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 com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
 * @title: MicroCommercialStreetApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 微商业街相关接口
 * @author: hans
 * @date: 2021/12/28 14:18
 */
@Api(tags = {"微商业街"})
@RestController
@RequestMapping("/microcommercialstreet")
public class MicroCommercialStreetApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @ApiOperation(value = "新增数字商业街商家")
    @PostMapping("/merchant/add")
    public R addMcsMerchant(@RequestBody @Validated(AddGroup.class) McsMerchantDTO mcsMerchantDTO) {
        Long userId = this.getUserId();
        mcsMerchantDTO.setCreatedBy(userId);
        mcsMerchantDTO.setUpdatedBy(userId);
        return communityService.addMcsMerchant(mcsMerchantDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/microCommercialStreet/McsMerchantDTO.java
New file
@@ -0,0 +1,81 @@
package com.panzhihua.common.model.dtos.community.microCommercialStreet;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: McsMerchantDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description:
 * @author: hans
 * @date: 2021/12/28 14:32
 */
@Data
@ApiModel("新增/编辑微商业街商家")
public class McsMerchantDTO {
    @ApiModelProperty("微商业街商家ID")
    @NotNull(groups = {PutGroup.class}, message = "微商业街商家ID不能为空")
    private Long id;
    @ApiModelProperty("商家名称")
    @NotBlank(groups = {AddGroup.class}, message = "商家名称不能为空")
    private String name;
    @ApiModelProperty("手机号")
    @Pattern(groups = {AddGroup.class}, message = "手机号格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$")
    private String phone;
    @ApiModelProperty("商家级别(1.临时商家 2.合作商家)")
    @NotNull(groups = {AddGroup.class}, message = "商家级别不能为空")
    private Integer level;
    @ApiModelProperty("点亮天数")
    private Integer litDays;
    @ApiModelProperty("商家账号")
    @NotBlank(groups = {AddGroup.class}, message = "商家账号不能为空")
    private String account;
    @ApiModelProperty("密码")
//    @Pattern(groups = {AddGroup.class}, message = "请输入8-12位密码,由英文,数字和特殊符号组成",
//            regexp = "^(?=.*[A-Za-z])(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,12}$")
    @NotBlank(groups = {AddGroup.class}, message = "密码不能为空")
    private String password;
    @ApiModelProperty("账号状态(1.启用 2.禁用)")
    @NotNull(groups = {AddGroup.class}, message = "账号状态不能为空")
    private Integer accountStatus;
    @ApiModelProperty("商家logo")
    private String logo;
    @ApiModelProperty("戳戳点亮上限(发布次数上限)")
    private Integer publishLimit;
    @ApiModelProperty("商家地址")
    private String address;
    @ApiModelProperty("纬度")
    private String lat;
    @ApiModelProperty("经度")
    private String lon;
    @ApiModelProperty("商家介绍")
    private String introduction;
    @ApiModelProperty(value = "创建人", hidden = true)
    private Long createdBy;
    @ApiModelProperty(value = "更新人", hidden = true)
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -3,6 +3,7 @@
import java.util.List;
import com.panzhihua.common.model.dtos.PageBaseDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -7712,4 +7713,12 @@
     */
    @PostMapping("/screen/index/volunteerActList")
    R indexVolunteerActList(@RequestBody PageBaseDTO pageBaseDTO);
    /**
     * 新增数字商业街商家
     * @param mcsMerchantDTO
     * @return
     */
    @PostMapping("/microcommercialstreet/merchant/add")
    R addMcsMerchant(@RequestBody McsMerchantDTO mcsMerchantDTO);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -5,6 +5,7 @@
import com.panzhihua.common.model.dtos.DataKanBansDto;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@@ -1092,4 +1093,12 @@
     */
    @GetMapping("/getByUnionId")
    R getUserInfoByUnionId(@RequestParam("unionId") String unionId);
    /**
     * 微商业街新增商家账号
     * @param mcsMerchantDTO
     * @return 商家用户id
     */
    @PostMapping("insertMcsMerchantAccount")
    R addMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java
New file
@@ -0,0 +1,44 @@
package com.panzhihua.service_community.api;
import javax.annotation.Resource;
import com.panzhihua.service_community.service.McsMerchantService;
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 com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
 * @title: MicroCommercialStreetApi
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 微商业街相关接口
 * @author: hans
 * @date: 2021/12/28 14:18
 */
@RestController
@RequestMapping("/microcommercialstreet")
public class MicroCommercialStreetApi {
    @Resource
    private McsMerchantService mcsMerchantService;
    /**
     * 新增数字商业街商家
     * @param mcsMerchantDTO
     * @return
     */
    @PostMapping("/merchant/add")
    public R addMcsMerchant(@RequestBody McsMerchantDTO mcsMerchantDTO) {
        return mcsMerchantService.addMcsMerchant(mcsMerchantDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsConfigDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsConfig;
/**
 * (McsConfig)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:06
 */
@Mapper
public interface McsConfigDAO extends BaseMapper<McsConfig> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsConfig> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsConfig> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsConfig> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsConfig> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsCouponDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsCoupon;
/**
 * (McsCoupon)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:07
 */
@Mapper
public interface McsCouponDAO extends BaseMapper<McsCoupon> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsCoupon> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsCoupon> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsCoupon> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsCoupon> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsEvaluateDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsEvaluate;
/**
 * (McsEvaluate)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:08
 */
@Mapper
public interface McsEvaluateDAO extends BaseMapper<McsEvaluate> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsEvaluate> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsEvaluate> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsEvaluate> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsEvaluate> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsGameDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsGame;
/**
 * (McsGame)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:09
 */
@Mapper
public interface McsGameDAO extends BaseMapper<McsGame> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsGame> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsGame> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsGame> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsGame> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsInformationDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsInformation;
/**
 * (McsInformation)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:10
 */
@Mapper
public interface McsInformationDAO extends BaseMapper<McsInformation> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsInformation> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsInformation> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsInformation> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsInformation> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsLabelDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsLabel;
/**
 * (McsLabel)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:10
 */
@Mapper
public interface McsLabelDAO extends BaseMapper<McsLabel> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsLabel> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsLabel> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsLabel> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsLabel> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsMerchantDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsMerchant;
/**
 * (McsMerchant)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:11
 */
@Mapper
public interface McsMerchantDAO extends BaseMapper<McsMerchant> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsMerchant> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsMerchant> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsMerchant> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsMerchant> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsProductDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsProduct;
/**
 * (McsProduct)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:12
 */
@Mapper
public interface McsProductDAO extends BaseMapper<McsProduct> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsProduct> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsProduct> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsProduct> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsProduct> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsProductLabelDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsProductLabel;
/**
 * (McsProductLabel)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:12
 */
@Mapper
public interface McsProductLabelDAO extends BaseMapper<McsProductLabel> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsProductLabel> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsProductLabel> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsProductLabel> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsProductLabel> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/McsVerifiedRecordDAO.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.McsVerifiedRecord;
/**
 * (McsVerifiedRecord)表数据库访问层
 *
 * @author makejava
 * @since 2021-12-28 14:37:13
 */
@Mapper
public interface McsVerifiedRecordDAO extends BaseMapper<McsVerifiedRecord> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsVerifiedRecord> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<McsVerifiedRecord> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<McsVerifiedRecord> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<McsVerifiedRecord> entities);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsConfig.java
New file
@@ -0,0 +1,51 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsConfig)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:07
 */
@Data
@TableName(value = "mcs_config")
@SuppressWarnings("serial")
public class McsConfig implements Serializable {
    private static final long serialVersionUID = 304699800613967550L;
    private Long id;
    /**
     * 商业街配置项名称
     */
    private String name;
    /**
     * 配置项
     */
    private String key;
    /**
     * 配置内容
     */
    private String value;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 由谁更新
     */
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsCoupon.java
New file
@@ -0,0 +1,47 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsCoupon)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:08
 */
@Data
@TableName(value = "mcs_coupon")
@SuppressWarnings("serial")
public class McsCoupon implements Serializable {
    private static final long serialVersionUID = 236342407932267836L;
    private Long id;
    /**
     * 关联id
     */
    private Long gameId;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 二维码
     */
    private String qrCode;
    /**
     * 是否核验
     */
    private Boolean isVerified;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 最后更新时间
     */
    private Date updatedAt;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsEvaluate.java
New file
@@ -0,0 +1,43 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsEvaluate)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:08
 */
@Data
@TableName(value = "mcs_evaluate")
@SuppressWarnings("serial")
public class McsEvaluate implements Serializable {
    private static final long serialVersionUID = -64045498558186286L;
    private Long id;
    /**
     * 戳戳卷码id
     */
    private Long couponId;
    /**
     * 评分(1.差 2.一般 3.还不错 4.很满意 5.强烈推荐)
     */
    private Integer star;
    /**
     * 评价内容
     */
    private String content;
    /**
     * 评价图片(多张逗号隔开)
     */
    private String photos;
    /**
     * 评价时间
     */
    private Date createdAt;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsGame.java
New file
@@ -0,0 +1,111 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsGame)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:09
 */
@Data
@TableName(value = "mcs_game")
@SuppressWarnings("serial")
public class McsGame implements Serializable {
    private static final long serialVersionUID = 996990563935718402L;
    private Long id;
    /**
     * 游戏名称
     */
    private String name;
    /**
     * 戳戳卷数量
     */
    private Integer coupons;
    /**
     * 剩余戳戳卷数量
     */
    private Integer surplusCoupons;
    /**
     * 游戏类别(1.戳戳币游戏 2.体验游戏)
     */
    private Integer type;
    /**
     * 奖励类型(1.免费产品 2.免费服务)
     */
    private Integer awardType;
    /**
     * 戳戳币分配方式(1.随机分配 2.平均分配)
     */
    private Integer allocation;
    /**
     * 戳戳币总额
     */
    private Integer coins;
    /**
     * 地址
     */
    private String address;
    /**
     * 纬度
     */
    private String lat;
    /**
     * 经度
     */
    private String lon;
    /**
     * 失效时间
     */
    private Date expireAt;
    /**
     * 封面
     */
    private String cover;
    /**
     * 其他图片(多张图片以逗号隔开)
     */
    private String otherImages;
    /**
     * 游戏介绍
     */
    private String introduction;
    /**
     * 状态(1.未发布 2.进行中 3.已下架 4.已结束)
     */
    private Integer status;
    /**
     * 发布时间
     */
    private Date publishAt;
    /**
     * 是否删除
     */
    private Boolean isDel;
    /**
     * 所属商家
     */
    private Long merchantId;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 由谁更新
     */
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsInformation.java
New file
@@ -0,0 +1,79 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsInformation)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:10
 */
@Data
@TableName(value = "mcs_information")
@SuppressWarnings("serial")
public class McsInformation implements Serializable {
    private static final long serialVersionUID = -78188903489439933L;
    private Long id;
    /**
     * 资讯标题
     */
    private String name;
    /**
     * 地址
     */
    private String address;
    /**
     * 纬度
     */
    private String lat;
    /**
     * 经度
     */
    private String lon;
    /**
     * 封面
     */
    private String cover;
    /**
     * 资讯内容
     */
    private String content;
    /**
     * 状态(1.未发布 2.已发布 3.已下架)
     */
    private Integer status;
    /**
     * 发布时间
     */
    private Date publishAt;
    /**
     * 是否删除
     */
    private Boolean isDel;
    /**
     * 所属商家
     */
    private Long merchantId;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 由谁更新
     */
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsLabel.java
New file
@@ -0,0 +1,55 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsLabel)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:10
 */
@Data
@TableName(value = "mcs_label")
@SuppressWarnings("serial")
public class McsLabel implements Serializable {
    private static final long serialVersionUID = -23139583272426139L;
    private Long id;
    /**
     * 标签名称
     */
    private String name;
    /**
     * 说明
     */
    private String introduction;
    /**
     * 是否删除
     */
    private Boolean isDel;
    /**
     * 所属商家
     */
    private Long merchantId;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 由谁更新
     */
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsMerchant.java
New file
@@ -0,0 +1,91 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsMerchant)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:11
 */
@Data
@TableName(value = "mcs_merchant")
@SuppressWarnings("serial")
public class McsMerchant implements Serializable {
    private static final long serialVersionUID = 535915125894031919L;
    private Long id;
    /**
     * 商家名称
     */
    private String name;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 商家账号
     */
    private String account;
    /**
     * 商家logo
     */
    private String logo;
    /**
     * 关联用户id
     */
    private Long userId;
    /**
     * 商家级别(1.临时商家 2.合作商家)
     */
    private Integer level;
    /**
     * 戳戳点亮上限(发布次数上限)
     */
    private Integer publishLimit;
    /**
     * 到期时间
     */
    private Date expireAt;
    /**
     * 商家地址
     */
    private String address;
    /**
     * 纬度
     */
    private String lat;
    /**
     * 经度
     */
    private String lon;
    /**
     * 商家简介
     */
    private String introduction;
    /**
     * 是否删除
     */
    private Boolean isDel;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 更新时间
     */
    private Date updatedAt;
    /**
     * 由谁更新
     */
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsProduct.java
New file
@@ -0,0 +1,67 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsProduct)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:12
 */
@Data
@TableName(value = "mcs_product")
@SuppressWarnings("serial")
public class McsProduct implements Serializable {
    private static final long serialVersionUID = 415357403059379804L;
    private Long id;
    /**
     * 产品名称
     */
    private String name;
    /**
     * 产品图片
     */
    private String image;
    /**
     * 产品介绍
     */
    private String introduction;
    /**
     * 浏览量
     */
    private Integer viewNum;
    /**
     * 状态(1.上架中 2.已下架)
     */
    private Integer status;
    /**
     * 是否删除
     */
    private Boolean isDel;
    /**
     * 所属商家
     */
    private Long merchantId;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 创建人
     */
    private Long createdBy;
    /**
     * 最后更新时间
     */
    private Date updatedAt;
    /**
     * 由谁更新
     */
    private Long updatedBy;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsProductLabel.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsProductLabel)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:13
 */
@Data
@TableName(value = "mcs_product_label")
@SuppressWarnings("serial")
public class McsProductLabel implements Serializable {
    private static final long serialVersionUID = 292891837724574338L;
    private Long id;
    /**
     * 产品id
     */
    private Long productId;
    /**
     * 标签id
     */
    private Long labelId;
    /**
     * 标签名
     */
    private String labelName;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/McsVerifiedRecord.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * (McsVerifiedRecord)表实体类
 *
 * @author makejava
 * @since 2021-12-28 14:37:14
 */
@Data
@TableName(value = "mcs_verified_record")
@SuppressWarnings("serial")
public class McsVerifiedRecord implements Serializable {
    private static final long serialVersionUID = -81350642843928838L;
    private Long id;
    /**
     * 戳戳卷码id
     */
    private Long couponId;
    /**
     * 核验所属资源名称
     */
    private String name;
    /**
     * 获得奖励
     */
    private String award;
    /**
     * 核验时间
     */
    private Date verifiedAt;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsConfigService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsConfig;
/**
 * (McsConfig)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:07
 */
public interface McsConfigService extends IService<McsConfig> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsCouponService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsCoupon;
/**
 * (McsCoupon)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:08
 */
public interface McsCouponService extends IService<McsCoupon> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsEvaluateService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsEvaluate;
/**
 * (McsEvaluate)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:08
 */
public interface McsEvaluateService extends IService<McsEvaluate> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsGameService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsGame;
/**
 * (McsGame)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:09
 */
public interface McsGameService extends IService<McsGame> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsInformationService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsInformation;
/**
 * (McsInformation)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:10
 */
public interface McsInformationService extends IService<McsInformation> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsLabelService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsLabel;
/**
 * (McsLabel)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:11
 */
public interface McsLabelService extends IService<McsLabel> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsMerchantService.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.McsMerchant;
/**
 * (McsMerchant)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:11
 */
public interface McsMerchantService extends IService<McsMerchant> {
    /**
     * 新增数字商业街商家
     * @param mcsMerchantDTO
     * @return
     */
    R addMcsMerchant(McsMerchantDTO mcsMerchantDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsProductLabelService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsProductLabel;
/**
 * (McsProductLabel)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:13
 */
public interface McsProductLabelService extends IService<McsProductLabel> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsProductService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsProduct;
/**
 * (McsProduct)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:12
 */
public interface McsProductService extends IService<McsProduct> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/McsVerifiedRecordService.java
New file
@@ -0,0 +1,14 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.service_community.entity.McsVerifiedRecord;
/**
 * (McsVerifiedRecord)表服务接口
 *
 * @author makejava
 * @since 2021-12-28 14:37:14
 */
public interface McsVerifiedRecordService extends IService<McsVerifiedRecord> {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsConfigServiceImpl.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsConfigDAO;
import com.panzhihua.service_community.entity.McsConfig;
import com.panzhihua.service_community.service.McsConfigService;
import org.springframework.stereotype.Service;
/**
 * (McsConfig)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:07
 */
@Service("mcsConfigService")
public class McsConfigServiceImpl extends ServiceImpl<McsConfigDAO, McsConfig> implements McsConfigService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsCouponServiceImpl.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsCouponDAO;
import com.panzhihua.service_community.entity.McsCoupon;
import com.panzhihua.service_community.service.McsCouponService;
import org.springframework.stereotype.Service;
/**
 * (McsCoupon)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:08
 */
@Service("mcsCouponService")
public class McsCouponServiceImpl extends ServiceImpl<McsCouponDAO, McsCoupon> implements McsCouponService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsEvaluateServiceImpl.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsEvaluateDAO;
import com.panzhihua.service_community.entity.McsEvaluate;
import com.panzhihua.service_community.service.McsEvaluateService;
import org.springframework.stereotype.Service;
/**
 * (McsEvaluate)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:09
 */
@Service("mcsEvaluateService")
public class McsEvaluateServiceImpl extends ServiceImpl<McsEvaluateDAO, McsEvaluate> implements McsEvaluateService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsGameDAO;
import com.panzhihua.service_community.entity.McsGame;
import com.panzhihua.service_community.service.McsGameService;
import org.springframework.stereotype.Service;
/**
 * (McsGame)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:09
 */
@Service("mcsGameService")
public class McsGameServiceImpl extends ServiceImpl<McsGameDAO, McsGame> implements McsGameService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsInformationServiceImpl.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsInformationDAO;
import com.panzhihua.service_community.entity.McsInformation;
import com.panzhihua.service_community.service.McsInformationService;
import org.springframework.stereotype.Service;
/**
 * (McsInformation)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:10
 */
@Service("mcsInformationService")
public class McsInformationServiceImpl extends ServiceImpl<McsInformationDAO, McsInformation>
    implements McsInformationService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsLabelServiceImpl.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsLabelDAO;
import com.panzhihua.service_community.entity.McsLabel;
import com.panzhihua.service_community.service.McsLabelService;
import org.springframework.stereotype.Service;
/**
 * (McsLabel)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:11
 */
@Service("mcsLabelService")
public class McsLabelServiceImpl extends ServiceImpl<McsLabelDAO, McsLabel> implements McsLabelService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsMerchantServiceImpl.java
New file
@@ -0,0 +1,68 @@
package com.panzhihua.service_community.service.impl;
import java.util.Date;
import javax.annotation.Resource;
import com.panzhihua.common.utlis.DateUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.dao.McsMerchantDAO;
import com.panzhihua.service_community.entity.McsMerchant;
import com.panzhihua.service_community.service.McsMerchantService;
import static java.util.Objects.isNull;
/**
 * (McsMerchant)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:11
 */
@Service("mcsMerchantService")
public class McsMerchantServiceImpl extends ServiceImpl<McsMerchantDAO, McsMerchant> implements McsMerchantService {
    @Resource
    private UserService userService;
    /**
     * 新增数字商业街商家
     * @param mcsMerchantDTO
     * @return
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R addMcsMerchant(McsMerchantDTO mcsMerchantDTO) {
        McsMerchant mcsMerchant = new McsMerchant();
        BeanUtils.copyProperties(mcsMerchantDTO, mcsMerchant);
        if (mcsMerchantDTO.getLevel().equals(1)) {
            Integer litDays = mcsMerchantDTO.getLitDays();
            if (isNull(litDays)) {
                return R.fail("临时商家未设置点亮天数");
            }
            mcsMerchant.setExpireAt(DateUtils.addDay(new Date(), litDays));
        }
        mcsMerchant.setUserId(0L);
        int insertResult = this.baseMapper.insert(mcsMerchant);
        if (insertResult > 0) {
            //添加user
            R addUserResult = userService.addMcsMerchantUser(mcsMerchantDTO);
            if (R.isOk(addUserResult)) {
                Long merchantUserId = ((Integer) addUserResult.getData()).longValue();
                mcsMerchant.setUserId(merchantUserId);
                this.baseMapper.updateById(mcsMerchant);
            } else {
                throw new ServiceException("406", addUserResult.getMsg());
            }
            return R.ok();
        }
        return R.fail("添加失败");
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsProductLabelServiceImpl.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsProductLabelDAO;
import com.panzhihua.service_community.entity.McsProductLabel;
import com.panzhihua.service_community.service.McsProductLabelService;
import org.springframework.stereotype.Service;
/**
 * (McsProductLabel)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:13
 */
@Service("mcsProductLabelService")
public class McsProductLabelServiceImpl extends ServiceImpl<McsProductLabelDAO, McsProductLabel>
    implements McsProductLabelService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsProductServiceImpl.java
New file
@@ -0,0 +1,18 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsProductDAO;
import com.panzhihua.service_community.entity.McsProduct;
import com.panzhihua.service_community.service.McsProductService;
import org.springframework.stereotype.Service;
/**
 * (McsProduct)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:12
 */
@Service("mcsProductService")
public class McsProductServiceImpl extends ServiceImpl<McsProductDAO, McsProduct> implements McsProductService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsVerifiedRecordServiceImpl.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.service_community.dao.McsVerifiedRecordDAO;
import com.panzhihua.service_community.entity.McsVerifiedRecord;
import com.panzhihua.service_community.service.McsVerifiedRecordService;
import org.springframework.stereotype.Service;
/**
 * (McsVerifiedRecord)表服务实现类
 *
 * @author makejava
 * @since 2021-12-28 14:37:14
 */
@Service("mcsVerifiedRecordService")
public class McsVerifiedRecordServiceImpl extends ServiceImpl<McsVerifiedRecordDAO, McsVerifiedRecord>
    implements McsVerifiedRecordService {
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsConfigMapper.xml
New file
@@ -0,0 +1,39 @@
<?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.panzhihua.service_community.dao.McsConfigDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsConfig" id="McsConfigMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="key" column="key" jdbcType="VARCHAR"/>
        <result property="value" column="value" jdbcType="VARCHAR"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
        <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_config(name, key, value, created_at, created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.key}, #{entity.value}, #{entity.createdAt}, #{entity.createdBy},
            #{entity.updatedAt}, #{entity.updatedBy})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_config(name, key, value, created_at, created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.key}, #{entity.value}, #{entity.createdAt}, #{entity.createdBy},
            #{entity.updatedAt}, #{entity.updatedBy})
        </foreach>
        on duplicate key update
        name = values(name) , key = values(key) , value = values(value) , created_at = values(created_at) , created_by =
        values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsCouponMapper.xml
New file
@@ -0,0 +1,38 @@
<?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.panzhihua.service_community.dao.McsCouponDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsCoupon" id="McsCouponMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="gameId" column="game_id" jdbcType="INTEGER"/>
        <result property="userId" column="user_id" jdbcType="INTEGER"/>
        <result property="qrCode" column="qr_code" jdbcType="VARCHAR"/>
        <result property="isVerified" column="is_verified" jdbcType="VARCHAR"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_coupon(game_id, user_id, qr_code, is_verified, created_at, updated_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.gameId}, #{entity.userId}, #{entity.qrCode}, #{entity.isVerified}, #{entity.createdAt},
            #{entity.updatedAt})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_coupon(game_id, user_id, qr_code, is_verified, created_at, updated_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.gameId}, #{entity.userId}, #{entity.qrCode}, #{entity.isVerified}, #{entity.createdAt},
            #{entity.updatedAt})
        </foreach>
        on duplicate key update
        game_id = values(game_id) , user_id = values(user_id) , qr_code = values(qr_code) , is_verified =
        values(is_verified) , created_at = values(created_at) , updated_at = values(updated_at)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsEvaluateMapper.xml
New file
@@ -0,0 +1,35 @@
<?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.panzhihua.service_community.dao.McsEvaluateDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsEvaluate" id="McsEvaluateMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="couponId" column="coupon_id" jdbcType="INTEGER"/>
        <result property="star" column="star" jdbcType="INTEGER"/>
        <result property="content" column="content" jdbcType="VARCHAR"/>
        <result property="photos" column="photos" jdbcType="VARCHAR"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_evaluate(coupon_id, star, content, photos, created_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.couponId}, #{entity.star}, #{entity.content}, #{entity.photos}, #{entity.createdAt})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_evaluate(coupon_id, star, content, photos, created_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.couponId}, #{entity.star}, #{entity.content}, #{entity.photos}, #{entity.createdAt})
        </foreach>
        on duplicate key update
        coupon_id = values(coupon_id) , star = values(star) , content = values(content) , photos = values(photos) ,
        created_at = values(created_at)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsGameMapper.xml
New file
@@ -0,0 +1,69 @@
<?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.panzhihua.service_community.dao.McsGameDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsGame" id="McsGameMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="coupons" column="coupons" jdbcType="INTEGER"/>
        <result property="surplusCoupons" column="surplus_coupons" jdbcType="INTEGER"/>
        <result property="type" column="type" jdbcType="INTEGER"/>
        <result property="awardType" column="award_type" jdbcType="INTEGER"/>
        <result property="allocation" column="allocation" jdbcType="INTEGER"/>
        <result property="coins" column="coins" jdbcType="INTEGER"/>
        <result property="address" column="address" jdbcType="VARCHAR"/>
        <result property="lat" column="lat" jdbcType="VARCHAR"/>
        <result property="lon" column="lon" jdbcType="VARCHAR"/>
        <result property="expireAt" column="expire_at" jdbcType="TIMESTAMP"/>
        <result property="cover" column="cover" jdbcType="VARCHAR"/>
        <result property="otherImages" column="other_images" jdbcType="VARCHAR"/>
        <result property="introduction" column="introduction" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="publishAt" column="publish_at" jdbcType="TIMESTAMP"/>
        <result property="isDel" column="is_del" jdbcType="VARCHAR"/>
        <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
        <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_game(name, coupons, surplus_coupons, type, award_type, allocation, coins, address,
        lat, lon, expire_at, cover, other_images, introduction, status, publish_at, is_del, merchant_id, created_at,
        created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.coupons}, #{entity.surplusCoupons}, #{entity.type}, #{entity.awardType},
            #{entity.allocation}, #{entity.coins}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.expireAt},
            #{entity.cover}, #{entity.otherImages}, #{entity.introduction}, #{entity.status}, #{entity.publishAt},
            #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
            #{entity.updatedBy})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_game(name, coupons, surplus_coupons, type, award_type, allocation, coins, address,
        lat, lon, expire_at, cover, other_images, introduction, status, publish_at, is_del, merchant_id, created_at,
        created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.coupons}, #{entity.surplusCoupons}, #{entity.type}, #{entity.awardType},
            #{entity.allocation}, #{entity.coins}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.expireAt},
            #{entity.cover}, #{entity.otherImages}, #{entity.introduction}, #{entity.status}, #{entity.publishAt},
            #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
            #{entity.updatedBy})
        </foreach>
        on duplicate key update
        name = values(name) , coupons = values(coupons) , surplus_coupons = values(surplus_coupons) , type =
        values(type) , award_type = values(award_type) , allocation = values(allocation) , coins = values(coins) ,
        address = values(address) , lat = values(lat) , lon = values(lon) , expire_at = values(expire_at) , cover =
        values(cover) , other_images = values(other_images) , introduction = values(introduction) , status =
        values(status) , publish_at = values(publish_at) , is_del = values(is_del) , merchant_id = values(merchant_id) ,
        created_at = values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by
        = values(updated_by)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsInformationMapper.xml
New file
@@ -0,0 +1,52 @@
<?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.panzhihua.service_community.dao.McsInformationDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsInformation" id="McsInformationMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="address" column="address" jdbcType="VARCHAR"/>
        <result property="lat" column="lat" jdbcType="VARCHAR"/>
        <result property="lon" column="lon" jdbcType="VARCHAR"/>
        <result property="cover" column="cover" jdbcType="VARCHAR"/>
        <result property="content" column="content" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="publishAt" column="publish_at" jdbcType="TIMESTAMP"/>
        <result property="isDel" column="is_del" jdbcType="VARCHAR"/>
        <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
        <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_information(name, address, lat, lon, cover, content, status, publish_at, is_del,
        merchant_id, created_at, created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.cover}, #{entity.content},
            #{entity.status}, #{entity.publishAt}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt},
            #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_information(name, address, lat, lon, cover, content, status, publish_at, is_del,
        merchant_id, created_at, created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.address}, #{entity.lat}, #{entity.lon}, #{entity.cover}, #{entity.content},
            #{entity.status}, #{entity.publishAt}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt},
            #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy})
        </foreach>
        on duplicate key update
        name = values(name) , address = values(address) , lat = values(lat) , lon = values(lon) , cover = values(cover)
        , content = values(content) , status = values(status) , publish_at = values(publish_at) , is_del =
        values(is_del) , merchant_id = values(merchant_id) , created_at = values(created_at) , created_by =
        values(created_by) , updated_at = values(updated_at) , updated_by = values(updated_by)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsLabelMapper.xml
New file
@@ -0,0 +1,43 @@
<?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.panzhihua.service_community.dao.McsLabelDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsLabel" id="McsLabelMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="introduction" column="introduction" jdbcType="VARCHAR"/>
        <result property="isDel" column="is_del" jdbcType="VARCHAR"/>
        <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
        <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_label(name, introduction, is_del, merchant_id, created_at, created_by, updated_at,
        updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.introduction}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt},
            #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_label(name, introduction, is_del, merchant_id, created_at, created_by, updated_at,
        updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.introduction}, #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt},
            #{entity.createdBy}, #{entity.updatedAt}, #{entity.updatedBy})
        </foreach>
        on duplicate key update
        name = values(name) , introduction = values(introduction) , is_del = values(is_del) , merchant_id =
        values(merchant_id) , created_at = values(created_at) , created_by = values(created_by) , updated_at =
        values(updated_at) , updated_by = values(updated_by)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsMerchantMapper.xml
New file
@@ -0,0 +1,58 @@
<?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.panzhihua.service_community.dao.McsMerchantDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsMerchant" id="McsMerchantMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="phone" column="phone" jdbcType="VARCHAR"/>
        <result property="account" column="account" jdbcType="VARCHAR"/>
        <result property="logo" column="logo" jdbcType="VARCHAR"/>
        <result property="userId" column="user_id" jdbcType="INTEGER"/>
        <result property="level" column="level" jdbcType="INTEGER"/>
        <result property="publishLimit" column="publish_limit" jdbcType="INTEGER"/>
        <result property="expireAt" column="expire_at" jdbcType="TIMESTAMP"/>
        <result property="address" column="address" jdbcType="VARCHAR"/>
        <result property="lat" column="lat" jdbcType="VARCHAR"/>
        <result property="lon" column="lon" jdbcType="VARCHAR"/>
        <result property="introduction" column="introduction" jdbcType="VARCHAR"/>
        <result property="isDel" column="is_del" jdbcType="VARCHAR"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
        <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_merchant(name, phone, account, logo, user_id, level, publish_limit, expire_at,
        address, lat, lon, introduction, is_del, created_at, created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.phone}, #{entity.account}, #{entity.logo}, #{entity.userId}, #{entity.level},
            #{entity.publishLimit}, #{entity.expireAt}, #{entity.address}, #{entity.lat}, #{entity.lon},
            #{entity.introduction}, #{entity.isDel}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
            #{entity.updatedBy})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_merchant(name, phone, account, logo, user_id, level, publish_limit, expire_at,
        address, lat, lon, introduction, is_del, created_at, created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.phone}, #{entity.account}, #{entity.logo}, #{entity.userId}, #{entity.level},
            #{entity.publishLimit}, #{entity.expireAt}, #{entity.address}, #{entity.lat}, #{entity.lon},
            #{entity.introduction}, #{entity.isDel}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
            #{entity.updatedBy})
        </foreach>
        on duplicate key update
        name = values(name) , phone = values(phone) , account = values(account) , logo = values(logo) , user_id =
        values(user_id) , level = values(level) , publish_limit = values(publish_limit) , expire_at = values(expire_at)
        , address = values(address) , lat = values(lat) , lon = values(lon) , introduction = values(introduction) ,
        is_del = values(is_del) , created_at = values(created_at) , created_by = values(created_by) , updated_at =
        values(updated_at) , updated_by = values(updated_by)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsProductLabelMapper.xml
New file
@@ -0,0 +1,32 @@
<?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.panzhihua.service_community.dao.McsProductLabelDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsProductLabel" id="McsProductLabelMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="productId" column="product_id" jdbcType="INTEGER"/>
        <result property="labelId" column="label_id" jdbcType="INTEGER"/>
        <result property="labelName" column="label_name" jdbcType="VARCHAR"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_product_label(product_id, label_id, label_name)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.productId}, #{entity.labelId}, #{entity.labelName})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_product_label(product_id, label_id, label_name)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.productId}, #{entity.labelId}, #{entity.labelName})
        </foreach>
        on duplicate key update
        product_id = values(product_id) , label_id = values(label_id) , label_name = values(label_name)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsProductMapper.xml
New file
@@ -0,0 +1,49 @@
<?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.panzhihua.service_community.dao.McsProductDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsProduct" id="McsProductMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="image" column="image" jdbcType="VARCHAR"/>
        <result property="introduction" column="introduction" jdbcType="VARCHAR"/>
        <result property="viewNum" column="view_num" jdbcType="INTEGER"/>
        <result property="status" column="status" jdbcType="INTEGER"/>
        <result property="isDel" column="is_del" jdbcType="VARCHAR"/>
        <result property="merchantId" column="merchant_id" jdbcType="INTEGER"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="createdBy" column="created_by" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
        <result property="updatedBy" column="updated_by" jdbcType="INTEGER"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_product(name, image, introduction, view_num, status, is_del, merchant_id, created_at,
        created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.image}, #{entity.introduction}, #{entity.viewNum}, #{entity.status},
            #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
            #{entity.updatedBy})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_product(name, image, introduction, view_num, status, is_del, merchant_id, created_at,
        created_by, updated_at, updated_by)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.image}, #{entity.introduction}, #{entity.viewNum}, #{entity.status},
            #{entity.isDel}, #{entity.merchantId}, #{entity.createdAt}, #{entity.createdBy}, #{entity.updatedAt},
            #{entity.updatedBy})
        </foreach>
        on duplicate key update
        name = values(name) , image = values(image) , introduction = values(introduction) , view_num = values(view_num)
        , status = values(status) , is_del = values(is_del) , merchant_id = values(merchant_id) , created_at =
        values(created_at) , created_by = values(created_by) , updated_at = values(updated_at) , updated_by =
        values(updated_by)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/McsVerifiedRecordMapper.xml
New file
@@ -0,0 +1,33 @@
<?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.panzhihua.service_community.dao.McsVerifiedRecordDAO">
    <resultMap type="com.panzhihua.service_community.entity.McsVerifiedRecord" id="McsVerifiedRecordMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="couponId" column="coupon_id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="award" column="award" jdbcType="VARCHAR"/>
        <result property="verifiedAt" column="verified_at" jdbcType="TIMESTAMP"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_verified_record(coupon_id, name, award, verified_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.couponId}, #{entity.name}, #{entity.award}, #{entity.verifiedAt})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into smart_life.mcs_verified_record(coupon_id, name, award, verified_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.couponId}, #{entity.name}, #{entity.award}, #{entity.verifiedAt})
        </foreach>
        on duplicate key update
        coupon_id = values(coupon_id) , name = values(name) , award = values(award) , verified_at = values(verified_at)
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -7,6 +7,7 @@
import com.panzhihua.common.model.dtos.DataKanBansDto;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import org.springframework.web.bind.annotation.*;
import com.panzhihua.common.model.dtos.PageDTO;
@@ -1236,4 +1237,14 @@
    public R getUserInfoByUnionId(@RequestParam("unionId") String unionId) {
        return userService.getUserInfoByUnionId(unionId);
    }
    /**
     * 微商业街新增商家账号
     * @param mcsMerchantDTO
     * @return 商家用户id
     */
    @PostMapping("insertMcsMerchantAccount")
    public R addMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO) {
        return userService.addMcsMerchantUser(mcsMerchantDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -8,6 +8,7 @@
import com.panzhihua.common.model.dtos.community.NoticeReadDTO;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.model.dtos.grid.*;
import com.panzhihua.common.model.dtos.user.PageFeedBackDTO;
import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO;
@@ -756,4 +757,11 @@
     * @return
     */
    R getUserInfoByUnionId(String unionId);
    /**
     * 微商业街新增商家账号
     * @param mcsMerchantDTO
     * @return 商家用户id
     */
    R addMcsMerchantUser(McsMerchantDTO mcsMerchantDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -14,6 +14,7 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.BeanUtils;
@@ -2799,4 +2800,38 @@
        BeanUtils.copyProperties(sysUserDO, loginUserInfoVO);
        return R.ok(loginUserInfoVO);
    }
    /**
     * 微商业街新增商家账号
     * @param mcsMerchantDTO
     * @return 商家用户id
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R addMcsMerchantUser(McsMerchantDTO mcsMerchantDTO) {
        SysUserDO sysUserDO;
        sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda()
                .eq(SysUserDO::getAccount, mcsMerchantDTO.getAccount()).eq(SysUserDO::getType, 11));
        if (nonNull(sysUserDO)) {
            return R.fail("账户已经存在");
        }
        // sys_user 表
        sysUserDO = new SysUserDO();
        String encode = new BCryptPasswordEncoder().encode(mcsMerchantDTO.getPassword());
        BeanUtils.copyProperties(mcsMerchantDTO, sysUserDO);
        sysUserDO.setAccount(mcsMerchantDTO.getAccount());
        sysUserDO.setType(11);
        sysUserDO.setAreaId(null);
        sysUserDO.setStatus(mcsMerchantDTO.getAccountStatus());
        sysUserDO.setPhone(mcsMerchantDTO.getPhone());
        sysUserDO.setPassword(encode);
        try {
            userDao.insert(sysUserDO);
            return R.ok(sysUserDO.getUserId());
        } catch (Exception e) {
            e.printStackTrace();
            log.error("新增后台用户报错【{}】", e.getMessage());
        }
        return R.fail("新增商户发生错误");
    }
}