Browse Source

重构国际化,用户模块开发

master
caojianbin 8 months ago
parent
commit
98b8ea6a01
  1. 174
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/controller/ActivityController.java
  2. 92
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/controller/ActivitySearchController.java
  3. 145
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/entity/Activity.java
  4. 108
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/entity/ActivityBanner.java
  5. 78
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/entity/ActivitySearch.java
  6. 8
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/mapper/ActivityBannerMapper.java
  7. 17
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/mapper/ActivityMapper.java
  8. 17
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/mapper/ActivitySearchMapper.java
  9. 26
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/service/ActivityBannerService.java
  10. 48
      ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/service/impl/ActivityBannerServiceImpl.java
  11. 28
      ecell-internationalize/ecell-internationalize-system/src/main/resources/com/ecell/internationalize/system/mapper/ActivityBannerMapper.xml
  12. 36
      ecell-internationalize/ecell-internationalize-system/src/main/resources/com/ecell/internationalize/system/mapper/ActivityMapper.xml

174
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/controller/ActivityController.java

@ -0,0 +1,174 @@ @@ -0,0 +1,174 @@
package com.ecell.internationalize.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.utils.uuid.UUID;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.yisai.common.security.utils.SecurityUtils;
import com.yisai.system.common.annotation.SystemLog;
import com.yisai.system.common.constant.FieldConstant;
import com.yisai.system.common.utlis.I18nUtil;
import com.yisai.system.common.utlis.UploadUtil;
import com.yisai.system.entity.Activity;
import com.yisai.system.service.ActivityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;
/**
* <p>
* 活动 前端控制器
* </p>
*
* @author liy
* @since 2022-07-13
*/
@Api(value="活动",tags={"活动/往期活动接口"})
@RestController
@RequestMapping("/activity")
public class ActivityController {
@Autowired
private ActivityService activityService;
/**
* 活动条件分页查询
* @Author liy
* @Date 2022/7/14 16:38
* @param map 分页条件查询体
* @Return AjaxResult
*/
@ApiOperation("条件分页查询活动信息")
@PostMapping("current/list")
public AjaxResult queryAllByPage(@RequestBody Map<String,Object> map){
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.findAllByPage(map));
}
/**
* 活动发布
* @Author liy
* @Date 2022/7/14 16:38
* @param activity 实体类
* @Return AjaxResult
*/
@ApiOperation("活动发布/取消发布")
@SystemLog(msg =FieldConstant.ACTIVITY_BANNER,operation = FieldConstant.ACTIVITY_PUBLISH)
@PostMapping("current/changeStatus")
public AjaxResult changeStatusOrDelUser(@RequestBody @ApiParam(name="活动",value="传整个对象,修改其中status字段,(0:取消发布,1:发布)",required=true) Activity activity){
if (FieldConstant.MATH_ONE.equals(activity.getStatus())){
activity.setPublishUser("admin");
activity.setPublishTime(new Date());
}else {
activity.setPublishUser(null);
activity.setPublishTime(null);
}
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.updateById(activity));
}
/**
* 活动删除
* @Author liy
* @Date 2022/7/14 16:38
* @param activity 实体类
* @Return AjaxResult
*/
@ApiOperation("活动删除")
@SystemLog(msg =FieldConstant.ACTIVITY_BANNER,operation = FieldConstant.DELETE_OPERATOR)
@PostMapping("current/del")
public AjaxResult del(@RequestBody @ApiParam(name="活动",value="传整个对象,修改其中delFlag字段,(0:删除,1:正常)",required=true) Activity activity){
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.updateById(activity));
}
/**
* 活动上传/新增
* @Author liy
* @Date 2022/7/14 16:38
* @param file 文件
* @Return AjaxResult
*/
@ApiOperation("活动新增上传")
@SystemLog(msg =FieldConstant.ACTIVITY_BANNER,operation = FieldConstant.SAVE_OPERATOR)
@PostMapping("current/save")
public AjaxResult save(@RequestParam("file") MultipartFile file, @RequestParam("activityTitle") String activityTitle,
@RequestParam("sellingPrice") BigDecimal sellingPrice, String priceRepresent, @RequestParam("activityCategory")String activityCategory,
@RequestParam("activityAge")String activityAge, @RequestParam("activityAreas")String activityAreas, @RequestParam("activityQuota")String activityQuota,
Date expiryDate) throws IOException {
String path = UploadUtil.upload(file);
String id= UUID.randomUUID().toString(true);
Activity activity=new Activity();
activity.setId(id);
activity.setActivityTitle(activityTitle);
activity.setSellingPrice(sellingPrice);
activity.setPriceRepresent(priceRepresent);
activity.setActivityCategory(activityCategory);
activity.setActivityAge(activityAge);
activity.setActivityAreas(activityAreas);
activity.setActivityQuota(activityQuota);
activity.setExpiryDate(expiryDate);
activity.setCreateUser(SecurityUtils.getUsername());
activity.setBannerImage(path);
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.save(activity));
}
/**
* 活动上传/修改
* @Author liy
* @Date 2022/7/14 16:38
* @param file 文件
* @Return AjaxResult
*/
@ApiOperation("活动修改上传")
@SystemLog(msg =FieldConstant.ACTIVITY_BANNER,operation = FieldConstant.UPDATE_OPERATOR)
@PostMapping("current/update")
public AjaxResult update(@RequestParam(value = "file",required = false) MultipartFile file,@RequestParam("id")String id, @RequestParam("activityTitle") String activityTitle,
@RequestParam("sellingPrice") BigDecimal sellingPrice, String priceRepresent, @RequestParam("activityCategory")String activityCategory,
@RequestParam("activityAge")String activityAge, @RequestParam("activityAreas")String activityAreas, @RequestParam("activityQuota")String activityQuota,
@RequestParam("expiryDate")Date expiryDate) throws IOException {
Activity activity=new Activity();
if (null!=file) {
String path = UploadUtil.upload(file);
activity.setBannerImage(path);
}
activity.setId(id);
activity.setActivityTitle(activityTitle);
activity.setSellingPrice(sellingPrice);
activity.setPriceRepresent(priceRepresent);
activity.setActivityCategory(activityCategory);
activity.setActivityAge(activityAge);
activity.setActivityAreas(activityAreas);
activity.setActivityQuota(activityQuota);
activity.setExpiryDate(expiryDate);
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.updateById(activity));
}
/**
* 往期活动条件分页查询
* @Author liy
* @Date 2022/7/14 16:38
* @param map 分页条件查询体
* @Return AjaxResult
*/
@ApiOperation("往期活动条件分页查询")
@PostMapping("last/list")
public AjaxResult queryLastListByPage(@RequestBody Map<String,Object> map){
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.queryLastListByPage(map));
}
/**
* 搜索条件查询接口
* @Author liy
* @Date 2022/7/14 16:38
* @param type 实体类
* @Return AjaxResult
*/
@ApiOperation("搜索条件查询")
@GetMapping("current/query")
public AjaxResult del(@RequestParam @ApiParam(name="搜索类型",value="传type字段,(1:所属类别,2:年龄阶段,3: 活动区域)",required=true) String type){
QueryWrapper<Activity> queryWrapper = new QueryWrapper<>();
String value = FieldConstant.TYPE_MAP.get(type);
queryWrapper.select("DISTINCT "+value).eq("del_flag", FieldConstant.MATH_ONE);
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activityService.getBaseMapper().selectList(queryWrapper));
}
}

92
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/controller/ActivitySearchController.java

@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
package com.ecell.internationalize.system.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.utils.uuid.UUID;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.yisai.common.security.utils.SecurityUtils;
import com.yisai.system.common.annotation.SystemLog;
import com.yisai.system.common.constant.FieldConstant;
import com.yisai.system.common.utlis.I18nUtil;
import com.yisai.system.entity.ActivitySearch;
import com.yisai.system.service.ActivitySearchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
/**
* <p>
* 热门搜索 前端控制器
* </p>
*
* @author liy
* @since 2022-07-13
*/
@Api(value="热门搜索",tags={"热门搜索接口"})
@RestController
@RequestMapping("/activity_search")
public class ActivitySearchController {
@Autowired
private ActivitySearchService activitySearchService;
/**
* 热门搜索分页查询
* @Author liy
* @Date 2022/7/14 10:38
* @param page 分页
* @Return AjaxResult
*/
@ApiOperation("条件分页查询热门搜索信息")
@PostMapping("search/list")
public AjaxResult queryAll(@RequestBody Page<ActivitySearch> page){
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activitySearchService.findAllByPage(page));
}
/**
* 新增热门搜索
* @Author liy
* @Date 2022/7/14 10:38
* @param activitySearch 实体
* @Return AjaxResult
*/
@ApiOperation("新增热门搜索")
@SystemLog(msg =FieldConstant.HOT_SEARCH,operation = FieldConstant.SAVE_OPERATOR)
@PostMapping("search/save")
public AjaxResult saveSearch(@RequestBody @Valid ActivitySearch activitySearch){
String id= UUID.randomUUID().toString(true);
activitySearch.setId(id);
activitySearch.setCreateUser(SecurityUtils.getUsername());
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activitySearchService.save(activitySearch));
}
/**
* 修改热门搜索
* @Author liy
* @Date 2022/7/14 10:38
* @param activitySearch 实体
* @Return AjaxResult
*/
@ApiOperation("修改热门搜索")
@SystemLog(msg =FieldConstant.HOT_SEARCH,operation = FieldConstant.UPDATE_OPERATOR)
@PostMapping("search/update")
public AjaxResult updateSearch(@RequestBody @Valid ActivitySearch activitySearch){
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activitySearchService.updateById(activitySearch));
}
/**
* 删除热门搜索
* @Author liy
* @Date 2022/7/14 10:38
* @param activitySearch 实体
* @Return AjaxResult
*/
@ApiOperation("删除热门搜索")
@SystemLog(msg =FieldConstant.HOT_SEARCH,operation = FieldConstant.DELETE_OPERATOR)
@PostMapping("search/del")
public AjaxResult delCategory(@RequestBody @ApiParam(value="传整个对象,修改其中delFlag字段,(0:删除,1:正常)",required=true) ActivitySearch activitySearch){
return AjaxResult.success(I18nUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),activitySearchService.updateById(activitySearch));
}
}

145
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/entity/Activity.java

@ -0,0 +1,145 @@ @@ -0,0 +1,145 @@
package com.ecell.internationalize.system.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 活动
* </p>
*
* @author liy
* @since 2022-07-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("activity")
public class Activity implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键Id
*/
@TableId("id")
private String id;
/**
* 排序号
*/
private Integer activityOrder;
/**
* 原价
*/
private BigDecimal originalPrice;
/**
* banner图
*/
private String bannerImage;
/**
* 活动截至日期
*/
private Date expiryDate;
/**
* 活动类别
*/
private String activityCategory;
/**
* 活动标题
*/
private String activityTitle;
/**
* 售价
*/
private BigDecimal sellingPrice;
/**
* 活动价提前描述
*/
private String priceRepresent;
/**
* 活动年龄段
*/
private String activityAge;
/**
* 活动区域
*/
private String activityAreas;
/**
* 活动名额
*/
private String activityQuota;
/**
* 活动链接
*/
private String activityUrl;
/**
* 点击数
*/
private Integer clickCount;
/**
* 创建人
*/
private String createUser;
/**
* 创建时间
*/
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 修改人
*/
private String updateUser;
/**
* 修改时间
*/
@TableField(value = "update_time",fill = FieldFill.UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 删除标识0已删除1正常
*/
private String delFlag;
/**
* 发布者
*/
@TableField(value = "publish_user", strategy = FieldStrategy.IGNORED)
private String publishUser;
/**
* 发布时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(value = "publish_time", strategy = FieldStrategy.IGNORED)
private Date publishTime;
/**
* 是否发布0待发布1已发布,默认0
*/
private String status;
}

108
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/entity/ActivityBanner.java

@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
package com.ecell.internationalize.system.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 活动banner图
* </p>
*
* @author liy
* @since 2022-07-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("activity_banner")
public class ActivityBanner implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键Id
*/
@TableId("id")
private String id;
/**
* 排序号
*/
@NotNull(message = "排序序号不能为空")
private Integer bannerOrder;
/**
* 是否发布0待发布1已发布,默认0
*/
private String status;
/**
* 点击数
*/
private Integer clickCount;
/**
* banner图链接
*/
private String link;
/**
* banner图标题
*/
@NotBlank(message = "banner图标题不能为空")
private String title;
/**
* banner图
*/
private String banner;
/**
* 创建人
*/
private String createUser;
/**
* 创建时间
*/
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 修改人
*/
private String updateUser;
/**
* 修改时间
*/
@TableField(value = "update_time",fill = FieldFill.UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 删除标识0已删除1正常
*/
private String delFlag;
/**
* 发布者
*/
@TableField(value = "publish_user", strategy = FieldStrategy.IGNORED)
private String publishUser;
/**
* 发布时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(value = "publish_time", strategy = FieldStrategy.IGNORED)
private Date publishTime;
}

78
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/entity/ActivitySearch.java

@ -0,0 +1,78 @@ @@ -0,0 +1,78 @@
package com.ecell.internationalize.system.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author liy
* @since 2022-07-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("activity_search")
public class ActivitySearch implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键Id
*/
@TableId("id")
private String id;
/**
* 排序
*/
@NotNull(message = "排序序号不能为空")
private Integer searchOrder;
/**
* 热门搜索内容
*/
@NotBlank(message = "热门搜索内容不能为空")
private String searchName;
/**
* 创建人
*/
private String createUser;
/**
* 创建时间
*/
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 修改人
*/
private String updateUser;
/**
* 修改时间
*/
@TableField(value = "update_time",fill = FieldFill.UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 删除标识0已删除1正常
*/
private String delFlag;
}

8
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/mapper/ActivityBannerMapper.java

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
package com.ecell.internationalize.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ecell.internationalize.system.entity.ActivityBanner;
public interface ActivityBannerMapper extends BaseMapper<ActivityBanner> {
}

17
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/mapper/ActivityMapper.java

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
package com.ecell.internationalize.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ecell.internationalize.system.entity.Activity;
/**
* <p>
* 活动 Mapper 接口
* </p>
*
* @author liy
* @since 2022-07-13
*/
public interface ActivityMapper extends BaseMapper<Activity> {
}

17
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/mapper/ActivitySearchMapper.java

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
package com.ecell.internationalize.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ecell.internationalize.system.entity.ActivitySearch;
/**
* <p>
* Mapper 接口
* </p>
*
* @author liy
* @since 2022-07-13
*/
public interface ActivitySearchMapper extends BaseMapper<ActivitySearch> {
}

26
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/service/ActivityBannerService.java

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
package com.ecell.internationalize.system.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ecell.internationalize.system.entity.ActivityBanner;
import java.util.Map;
/**
* <p>
* 活动banner图 服务类
* </p>
*
* @author liy
* @since 2022-07-13
*/
public interface ActivityBannerService extends IService<ActivityBanner> {
/**
* 活动Banner分页查询
* @Author liy
* @Date 2022/7/14 16:42
* @param map 分页查询体
* @return IPage
*/
IPage<ActivityBanner> findAllByPage(Map<String,Object> map);
}

48
ecell-internationalize/ecell-internationalize-system/src/main/java/com/ecell/internationalize/system/service/impl/ActivityBannerServiceImpl.java

@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
package com.ecell.internationalize.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ecell.internationalize.common.system.constant.FieldConstant;
import com.ecell.internationalize.system.entity.ActivityBanner;
import com.ecell.internationalize.system.mapper.ActivityBannerMapper;
import com.ecell.internationalize.system.service.ActivityBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* <p>
* 活动banner图 服务实现类
* </p>
*
* @author liy
* @since 2022-07-13
*/
@Service
public class ActivityBannerServiceImpl extends ServiceImpl<ActivityBannerMapper, ActivityBanner> implements ActivityBannerService {
@Autowired
private ActivityBannerMapper activityBannerMapper;
/**
* 活动Banner分页查询
* @Author liy
* @Date 2022/7/14 16:42
* @param map 分页查询体
* @return IPage
*/
@Override
public IPage<ActivityBanner> findAllByPage(Map<String, Object> map) {
Page<ActivityBanner> page=new Page<>(Integer.parseInt(map.get(FieldConstant.CURRENT).toString()),Integer.parseInt(map.get(FieldConstant.SIZE).toString()));
LambdaQueryWrapper<ActivityBanner> queryWrapper = new LambdaQueryWrapper<>();
if (map.containsKey(FieldConstant.BANNER_TITLE)&&null!=map.get(FieldConstant.BANNER_TITLE).toString()){
queryWrapper.eq(ActivityBanner::getTitle,map.get(FieldConstant.BANNER_TITLE).toString());
}
if (map.containsKey(FieldConstant.STATUS)&&null!=map.get(FieldConstant.STATUS).toString()){
queryWrapper.eq(ActivityBanner::getStatus,map.get(FieldConstant.STATUS).toString());
}
queryWrapper.eq(ActivityBanner::getDelFlag, FieldConstant.MATH_ONE);
queryWrapper.orderByAsc(ActivityBanner::getBannerOrder);
return activityBannerMapper.selectPage(page,queryWrapper);
}
}

28
ecell-internationalize/ecell-internationalize-system/src/main/resources/com/ecell/internationalize/system/mapper/ActivityBannerMapper.xml

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
<?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.ecell.internationalize.system.mapper.ActivityBannerMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.ecell.internationalize.system.entity.ActivityBanner">
<id column="id" property="id" />
<result column="banner_order" property="bannerOrder" />
<result column="status" property="status" />
<result column="click_count" property="clickCount" />
<result column="link" property="link" />
<result column="title" property="title" />
<result column="banner" property="banner" />
<result column="create_user" property="createUser" />
<result column="create_time" property="createTime" />
<result column="update_user" property="updateUser" />
<result column="update_time" property="updateTime" />
<result column="del_flag" property="delFlag" />
<result column="publish_user" property="publishUser" />
<result column="publish_time" property="publishTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, banner_order, status, click_count, link, title, banner, create_user, create_time, update_user, update_time, del_flag, publish_user, publish_time
</sql>
</mapper>

36
ecell-internationalize/ecell-internationalize-system/src/main/resources/com/ecell/internationalize/system/mapper/ActivityMapper.xml

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
<?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.ecell.internationalize.system.mapper.ActivityMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.ecell.internationalize.system.entity.Activity">
<id column="id" property="id" />
<result column="activity_order" property="activityOrder" />
<result column="original_price" property="originalPrice" />
<result column="banner_image" property="bannerImage" />
<result column="expiry_date" property="expiryDate" />
<result column="activity_category" property="activityCategory" />
<result column="activity_title" property="activityTitle" />
<result column="selling_price" property="sellingPrice" />
<result column="price_represent" property="priceRepresent" />
<result column="activity_age" property="activityAge" />
<result column="activity_areas" property="activityAreas" />
<result column="activity_quota" property="activityQuota" />
<result column="activity_url" property="activityUrl" />
<result column="click_count" property="clickCount" />
<result column="create_user" property="createUser" />
<result column="create_time" property="createTime" />
<result column="update_user" property="updateUser" />
<result column="update_time" property="updateTime" />
<result column="del_flag" property="delFlag" />
<result column="publish_user" property="publishUser" />
<result column="publish_time" property="publishTime" />
<result column="status" property="status" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, activity_order, original_price, banner_image, expiry_date, activity_category, activity_title, selling_price, price_represent, activity_age, activity_areas, activity_quota, activity_url, click_count, create_user, create_time, update_user, update_time, del_flag, publish_user, publish_time ,status
</sql>
</mapper>
Loading…
Cancel
Save