| @@ -1,69 +0,0 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxBLog; | |||
| import com.iformall.service.WxBLogService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| @RestController | |||
| @RequestMapping("wxBLog") | |||
| @Api(description = "B端埋点相关接口") | |||
| public class WxBLogController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxBLogService wxBLogService; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData list(@ModelAttribute WxBLog wxBLog, Integer pageNum, Integer pageSize) { | |||
| if (null == wxBLog) wxBLog = new WxBLog(); | |||
| final PageInfo<WxBLog> page = wxBLogService.listAsPage(wxBLog, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("新增接口") | |||
| @PostMapping("add") | |||
| public ResultData add(@RequestBody WxBLog wxBLog) { | |||
| //Assert.notNull(wxBLog.getName(), "角色名不能为空"); | |||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | |||
| wxBLogService.saveOrUpdate(wxBLog); | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("根据id更新接口") | |||
| @PostMapping("update") | |||
| public ResultData update(@RequestBody WxBLog wxBLog) { | |||
| wxBLogService.saveOrUpdate(wxBLog); | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("根据id删除接口") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData delete(Long id) { | |||
| wxBLogService.deleteById(id); | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| public ResultData findById(Long id) { | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxBLogService.getById(id)); | |||
| } | |||
| } | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.domain.dto; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -15,13 +15,7 @@ import java.util.List; | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCUserBasicInfoDto extends BaseEntity { | |||
| /** | |||
| * | |||
| */ | |||
| private static final long serialVersionUID = -1116465873573690766L; | |||
| public class WxCUserBasicInfoDto extends BaseTenantEntity { | |||
| protected Long id; | |||
| @@ -36,10 +30,6 @@ public class WxCUserBasicInfoDto extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="姓名",name="name") | |||
| private String name; | |||
| @TableField(exist = false) | |||
| @io.swagger.annotations.ApiModelProperty(value="租户id",name="tenantId") | |||
| private String tenantId; | |||
| @TableField(exist = false) | |||
| private Integer reportType; | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -10,14 +10,10 @@ import java.util.Date; | |||
| @TableName(value = "wx_appinfo") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxAppinfo extends BaseEntity { | |||
| public class WxAppinfo extends BaseTenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId") | |||
| private String appId; | |||
| @io.swagger.annotations.ApiModelProperty(value="公众号ID",name="parentAppId") | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -11,12 +11,10 @@ import java.util.Date; | |||
| @TableName(value = "wx_authorizer_info") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxAuthorizerInfo extends BaseEntity { | |||
| public class WxAuthorizerInfo extends BaseTenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="1B端2C端",name="type") | |||
| private Integer type; | |||
| @io.swagger.annotations.ApiModelProperty(value="授权方appid",name="authorizerAppid") | |||
| @@ -1,26 +0,0 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.util.Date; | |||
| @TableName(value = "wx_b_log") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxBLog extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="data") | |||
| private String data; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| } | |||
| @@ -3,7 +3,7 @@ package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import com.iformall.utils.Constant; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -22,12 +22,10 @@ import java.util.UUID; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxBuser extends BaseEntity { | |||
| public class WxBuser extends BaseTenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "微信openId", name = "openId") | |||
| private String openId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "微信unionId", name = "unionId") | |||
| @@ -1,25 +0,0 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.util.*; | |||
| @TableName(value = "wx_c_log") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCLog extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="data") | |||
| private String data; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| } | |||
| @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.utils.Constant; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -20,12 +22,10 @@ import java.util.UUID; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCUser extends BaseEntity { | |||
| public class WxCUser extends TenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信openId",name="openId") | |||
| private String openId; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信unionId",name="unionId") | |||
| @@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.fasterxml.jackson.annotation.JsonIgnore; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| @@ -19,7 +19,7 @@ import java.util.Objects; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCUserBasicInfo extends BaseEntity { | |||
| public class WxCUserBasicInfo extends BaseTenantEntity { | |||
| protected Long id; | |||
| @@ -83,9 +83,6 @@ public class WxCUserBasicInfo extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="用户标签",name="tagId") | |||
| private Long tagId; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户id",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="会员等级",name="level") | |||
| private String level; | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -10,13 +10,10 @@ import java.util.*; | |||
| @TableName(value = "wx_c_user_car") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCUserCar extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| public class WxCUserCar extends BaseTenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="c端用户id",name="cUserId") | |||
| private Long cUserId; | |||
| @io.swagger.annotations.ApiModelProperty(value="车牌号",name="carNumber") | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -10,15 +10,10 @@ import java.util.*; | |||
| @TableName(value = "wx_c_user_tags") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCUserTags extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| public class WxCUserTags extends BaseTenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="c端用户id",name="userId") | |||
| private Long userId; | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="tags") | |||
| @@ -1,25 +0,0 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @TableName(value = "wx_channel") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxChannel extends BaseEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value = "渠道ID", name = "channelId") | |||
| private Integer channelId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "渠道名", name = "title") | |||
| private String title; | |||
| @io.swagger.annotations.ApiModelProperty(value = "图片url", name = "img") | |||
| private String img; | |||
| @io.swagger.annotations.ApiModelProperty(value = "是否支持批量投放0:不支持,1:支持", name = "batch") | |||
| private Integer batch; | |||
| } | |||
| @@ -9,7 +9,6 @@ import lombok.EqualsAndHashCode; | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCouponType extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| protected Long id; | |||
| @@ -1,7 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -10,13 +10,10 @@ import java.util.Date; | |||
| @TableName(value = "wx_cuser_floating_layer") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxCuserFloatingLayer extends BaseEntity { | |||
| public class WxCuserFloatingLayer extends BaseTenantEntity { | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value = "租户ID", name = "tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "C端用户ID", name = "userId") | |||
| private Long userId; | |||
| @@ -2,7 +2,7 @@ package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @@ -11,15 +11,12 @@ import java.util.*; | |||
| @TableName(value = "wx_level_config") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxLevelConfig extends BaseEntity { | |||
| public class WxLevelConfig extends BaseTenantEntity { | |||
| @TableField(exist = false) | |||
| public static final int DEFAULT_SCALE = 10; | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户id",name="tenantId") | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="成长值",name="points") | |||
| private Integer points; | |||
| @io.swagger.annotations.ApiModelProperty(value="等级",name="level") | |||
| @@ -11,7 +11,6 @@ import java.util.Date; | |||
| @TableName(value = "wx_logic_permission") | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxLogicPermission extends BaseEntity { | |||
| private static final long serialVersionUID = 1L; | |||
| @io.swagger.annotations.ApiModelProperty(value = "id", name = "主键") | |||
| protected Long id; | |||
| @@ -1,16 +0,0 @@ | |||
| package com.iformall.mapper; | |||
| import java.util.*; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxBLog; | |||
| public interface WxBLogMapper extends CommonMapper<WxBLog, String> { | |||
| List<WxBLog> findList(WxBLog wxBLog); | |||
| } | |||
| @@ -1,16 +0,0 @@ | |||
| package com.iformall.mapper; | |||
| import java.util.*; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxCLog; | |||
| public interface WxCLogMapper extends CommonMapper<WxCLog, String> { | |||
| List<WxCLog> findList(WxCLog wxCLog); | |||
| } | |||
| @@ -1,16 +0,0 @@ | |||
| package com.iformall.mapper; | |||
| import java.util.*; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxChannel; | |||
| public interface WxChannelMapper extends CommonMapper<WxChannel, String> { | |||
| List<WxChannel> findList(WxChannel wxChannel); | |||
| } | |||
| @@ -1,47 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxBLog; | |||
| public interface WxBLogService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @return | |||
| */ | |||
| PageInfo<WxBLog> listAsPage(WxBLog record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxBLog getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxBLog record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| } | |||
| @@ -1,47 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCLog; | |||
| public interface WxCLogService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @return | |||
| */ | |||
| PageInfo<WxCLog> listAsPage(WxCLog record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxCLog getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxCLog record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| } | |||
| @@ -1,47 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxChannel; | |||
| public interface WxChannelService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @return | |||
| */ | |||
| PageInfo<WxChannel> listAsPage(WxChannel record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxChannel getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxChannel record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| } | |||
| @@ -1,56 +0,0 @@ | |||
| package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxBLog; | |||
| import com.iformall.mapper.WxBLogMapper; | |||
| import com.iformall.service.WxBLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxBLogServiceImpl implements WxBLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxBLogMapper wxBLogMapper; | |||
| @Override | |||
| public PageInfo<WxBLog> listAsPage(WxBLog record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBLogMapper.findList(record)); | |||
| } | |||
| @Override | |||
| public WxBLog getById(Long id) { | |||
| return wxBLogMapper.selectById(id); | |||
| } | |||
| @Override | |||
| public void saveOrUpdate(WxBLog record) { | |||
| if (record.getId() == null) { | |||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| wxBLogMapper.insert(record); | |||
| } else { | |||
| wxBLogMapper.updateById(record); | |||
| } | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxBLogMapper.deleteById(id); | |||
| } | |||
| } | |||
| @@ -1,56 +0,0 @@ | |||
| package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCLog; | |||
| import com.iformall.mapper.WxCLogMapper; | |||
| import com.iformall.service.WxCLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCLogServiceImpl implements WxCLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCLogMapper wxCLogMapper; | |||
| @Override | |||
| public PageInfo<WxCLog> listAsPage(WxCLog record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCLogMapper.findList(record)); | |||
| } | |||
| @Override | |||
| public WxCLog getById(Long id) { | |||
| return wxCLogMapper.selectById(id); | |||
| } | |||
| @Override | |||
| public void saveOrUpdate(WxCLog record) { | |||
| if (record.getId() == null) { | |||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| wxCLogMapper.insert(record); | |||
| } else { | |||
| wxCLogMapper.updateById(record); | |||
| } | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxCLogMapper.deleteById(id); | |||
| } | |||
| } | |||
| @@ -1,56 +0,0 @@ | |||
| package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxChannel; | |||
| import com.iformall.mapper.WxChannelMapper; | |||
| import com.iformall.service.WxChannelService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxChannelServiceImpl implements WxChannelService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxChannelMapper wxChannelMapper; | |||
| @Override | |||
| public PageInfo<WxChannel> listAsPage(WxChannel record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxChannelMapper.findList(record)); | |||
| } | |||
| @Override | |||
| public WxChannel getById(Long id) { | |||
| return wxChannelMapper.selectById(id); | |||
| } | |||
| @Override | |||
| public void saveOrUpdate(WxChannel record) { | |||
| if (record.getId() == null) { | |||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| wxChannelMapper.insert(record); | |||
| } else { | |||
| wxChannelMapper.updateById(record); | |||
| } | |||
| } | |||
| @Override | |||
| public void deleteById(Long id) { | |||
| wxChannelMapper.deleteById(id); | |||
| } | |||
| } | |||
| @@ -1,56 +0,0 @@ | |||
| <?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.iformall.mapper.WxBLogMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBLog"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="data" jdbcType="VARCHAR" property="data" /> | |||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`data`,`create_date` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != data "> | |||
| and `data` like concat('%', #{data},'%') | |||
| </if> | |||
| <if test=" null != createDate "> | |||
| and `create_date` = #{createDate} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxBLog" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_b_log | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||
| @@ -1,56 +0,0 @@ | |||
| <?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.iformall.mapper.WxCLogMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCLog"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="data" jdbcType="VARCHAR" property="data" /> | |||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`data`,`create_date` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != data "> | |||
| and `data` like concat('%', #{data},'%') | |||
| </if> | |||
| <if test=" null != createDate "> | |||
| and `create_date` = #{createDate} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxCLog" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_c_log | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||
| @@ -1,56 +0,0 @@ | |||
| <?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.iformall.mapper.WxChannelMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxChannel"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="channel_id" jdbcType="INTEGER" property="channelId" /> | |||
| <result column="title" jdbcType="VARCHAR" property="title" /> | |||
| <result column="img" jdbcType="VARCHAR" property="img" /> | |||
| <result column="batch" jdbcType="INTEGER" property="batch" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`channel_id`,`title`,`img`,`batch` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1 = 1 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != channelId "> | |||
| and `channel_id` = #{channelId} | |||
| </if> | |||
| <if test=" null != title "> | |||
| and `title` like concat('%', #{title},'%') | |||
| </if> | |||
| <if test=" null != img "> | |||
| and `img` like concat('%', #{img},'%') | |||
| </if> | |||
| <if test=" null != batch "> | |||
| and `batch` = #{batch} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxChannel" resultMap="BaseResultMap"> | |||
| select <include refid="allColumns" /> from wx_channel | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| </mapper> | |||