会员客户端 api:获取会员主页 URL,获取会员积分,获取会员余额,获取会员代金券数量,获取会员具体项目首页 URL
This commit is contained in:
parent
5bc16cc9d5
commit
835e6dfcd0
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.system.huiyuan.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.huiyuan.service.IHyMemberDaoService;
|
||||
import com.ruoyi.system.huiyuan.service.IHyProjDaoService;
|
||||
import com.ruoyi.system.huiyuan.service.IHyProjTalentDaoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* @author ryo
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/huiyuan")
|
||||
public class ClientMemberController extends BaseController {
|
||||
|
||||
private final IHyMemberDaoService iHyMemberDaoService;
|
||||
|
||||
private final IHyProjDaoService iHyProjDaoService;
|
||||
|
||||
private final IHyProjTalentDaoService iHyProjTalentDaoService;
|
||||
|
||||
/**
|
||||
* 获取会员主页 URL
|
||||
*
|
||||
* @param memberId:会员 id
|
||||
* @author ryo
|
||||
*/
|
||||
@GetMapping("/getMemberUrl/{memberId}")
|
||||
public AjaxResult getMemberUrl(@PathVariable Long memberId) {
|
||||
|
||||
return AjaxResult.success(iHyMemberDaoService.getById(memberId).getMemberUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员积分
|
||||
*
|
||||
* @param memberId:会员 id
|
||||
* @author ryo
|
||||
*/
|
||||
@GetMapping("/getMemberPoints/{memberId}")
|
||||
public AjaxResult getMemberPoints(@PathVariable Long memberId) {
|
||||
|
||||
return AjaxResult.success(iHyMemberDaoService.getById(memberId).getPoints());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员余额
|
||||
*
|
||||
* @param memberId:会员 id
|
||||
* @author ryo
|
||||
*/
|
||||
@GetMapping("/getMemberBalance/{memberId}")
|
||||
public AjaxResult getMemberBalance(@PathVariable Long memberId) {
|
||||
|
||||
return AjaxResult.success(iHyMemberDaoService.getById(memberId).getBalance());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员代金券数量
|
||||
*
|
||||
* @param memberId:会员 id
|
||||
* @author ryo
|
||||
*/
|
||||
@GetMapping("/getMemberVoucher/{memberId}")
|
||||
public AjaxResult getMemberVoucher(@PathVariable Long memberId) {
|
||||
|
||||
return AjaxResult.success(iHyMemberDaoService.getById(memberId).getVoucher());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员具体项目首页 URL
|
||||
*
|
||||
* @param memberId:会员 id
|
||||
* @author ryo
|
||||
*/
|
||||
@GetMapping("/getMemberProjUrl/{memberId}")
|
||||
public AjaxResult getMemberProjUrl(@PathVariable Long memberId) {
|
||||
|
||||
Long projId = iHyMemberDaoService.getById(memberId).getProjId();
|
||||
|
||||
return AjaxResult.success(iHyProjDaoService.getById(projId).getHomeUrl());
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.ruoyi.system.huiyuan.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.huiyuan.domain.HyMemberDao;
|
||||
import com.ruoyi.system.huiyuan.service.IHyMemberDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 会员Controller
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/huiyuan/member" )
|
||||
public class HyMemberDaoController extends BaseController {
|
||||
|
||||
private final IHyMemberDaoService iHyMemberDaoService;
|
||||
|
||||
/**
|
||||
* 查询会员列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:member:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HyMemberDao hyMemberDao) {
|
||||
startPage();
|
||||
List<HyMemberDao> list = iHyMemberDaoService.queryList(hyMemberDao);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会员列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:member:export')" )
|
||||
@Log(title = "会员" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(HyMemberDao hyMemberDao) {
|
||||
List<HyMemberDao> list = iHyMemberDaoService.queryList(hyMemberDao);
|
||||
ExcelUtil<HyMemberDao> util = new ExcelUtil<HyMemberDao>(HyMemberDao.class);
|
||||
return util.exportExcel(list, "member" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:member:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iHyMemberDaoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:member:add')" )
|
||||
@Log(title = "会员" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HyMemberDao hyMemberDao) {
|
||||
return toAjax(iHyMemberDaoService.save(hyMemberDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:member:edit')" )
|
||||
@Log(title = "会员" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HyMemberDao hyMemberDao) {
|
||||
return toAjax(iHyMemberDaoService.updateById(hyMemberDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:member:remove')" )
|
||||
@Log(title = "会员" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iHyMemberDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.ruoyi.system.huiyuan.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjDao;
|
||||
import com.ruoyi.system.huiyuan.service.IHyProjDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Controller
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/huiyuan/proj" )
|
||||
public class HyProjDaoController extends BaseController {
|
||||
|
||||
private final IHyProjDaoService iHyProjDaoService;
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:proj:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HyProjDao hyProjDao) {
|
||||
startPage();
|
||||
List<HyProjDao> list = iHyProjDaoService.queryList(hyProjDao);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:proj:export')" )
|
||||
@Log(title = "项目信息" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(HyProjDao hyProjDao) {
|
||||
List<HyProjDao> list = iHyProjDaoService.queryList(hyProjDao);
|
||||
ExcelUtil<HyProjDao> util = new ExcelUtil<HyProjDao>(HyProjDao.class);
|
||||
return util.exportExcel(list, "proj" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:proj:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iHyProjDaoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:proj:add')" )
|
||||
@Log(title = "项目信息" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HyProjDao hyProjDao) {
|
||||
return toAjax(iHyProjDaoService.save(hyProjDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:proj:edit')" )
|
||||
@Log(title = "项目信息" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HyProjDao hyProjDao) {
|
||||
return toAjax(iHyProjDaoService.updateById(hyProjDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:proj:remove')" )
|
||||
@Log(title = "项目信息" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iHyProjDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.ruoyi.system.huiyuan.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjTalentDao;
|
||||
import com.ruoyi.system.huiyuan.service.IHyProjTalentDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 优才项目Controller
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/huiyuan/talent" )
|
||||
public class HyProjTalentDaoController extends BaseController {
|
||||
|
||||
private final IHyProjTalentDaoService iHyProjTalentDaoService;
|
||||
|
||||
/**
|
||||
* 查询优才项目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:talent:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HyProjTalentDao hyProjTalentDao) {
|
||||
startPage();
|
||||
List<HyProjTalentDao> list = iHyProjTalentDaoService.queryList(hyProjTalentDao);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出优才项目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:talent:export')" )
|
||||
@Log(title = "优才项目" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(HyProjTalentDao hyProjTalentDao) {
|
||||
List<HyProjTalentDao> list = iHyProjTalentDaoService.queryList(hyProjTalentDao);
|
||||
ExcelUtil<HyProjTalentDao> util = new ExcelUtil<HyProjTalentDao>(HyProjTalentDao.class);
|
||||
return util.exportExcel(list, "talent" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取优才项目详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:talent:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iHyProjTalentDaoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增优才项目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:talent:add')" )
|
||||
@Log(title = "优才项目" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HyProjTalentDao hyProjTalentDao) {
|
||||
return toAjax(iHyProjTalentDaoService.save(hyProjTalentDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改优才项目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:talent:edit')" )
|
||||
@Log(title = "优才项目" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HyProjTalentDao hyProjTalentDao) {
|
||||
return toAjax(iHyProjTalentDaoService.updateById(hyProjTalentDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除优才项目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('huiyuan:talent:remove')" )
|
||||
@Log(title = "优才项目" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iHyProjTalentDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.system.huiyuan.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 会员对象 hy_member
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("hy_member")
|
||||
public class HyMemberDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** id */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 手机 */
|
||||
@Excel(name = "手机")
|
||||
private String tel;
|
||||
|
||||
/** 密码 */
|
||||
@Excel(name = "密码")
|
||||
private String password;
|
||||
|
||||
/** 所属项目 */
|
||||
@Excel(name = "所属项目")
|
||||
private Integer projType;
|
||||
|
||||
/** 积分 */
|
||||
@Excel(name = "积分")
|
||||
private Long points;
|
||||
|
||||
/** 代金券 */
|
||||
@Excel(name = "代金券")
|
||||
private Long voucher;
|
||||
|
||||
/** 余额 */
|
||||
@Excel(name = "余额")
|
||||
private BigDecimal balance;
|
||||
|
||||
/** 智能设备 */
|
||||
@Excel(name = "智能设备")
|
||||
private String device;
|
||||
|
||||
/** 会员 URL */
|
||||
@Excel(name = "会员 URL")
|
||||
private String memberUrl;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@Excel(name = "更新时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateAt;
|
||||
|
||||
/** 项目 id */
|
||||
@Excel(name = "项目 id")
|
||||
private Long projId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.huiyuan.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 项目信息对象 hy_proj
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("hy_proj")
|
||||
public class HyProjDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** id */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projName;
|
||||
|
||||
/** 首页 URL */
|
||||
@Excel(name = "首页 URL")
|
||||
private String homeUrl;
|
||||
|
||||
/** 创建时间 */
|
||||
@Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createAt;
|
||||
|
||||
/** 更新时间 */
|
||||
@Excel(name = "更新时间" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateAt;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.ruoyi.system.huiyuan.domain;
|
||||
|
||||
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 com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优才项目对象 hy_proj_talent
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("hy_proj_talent")
|
||||
public class HyProjTalentDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 驿站分类
|
||||
*/
|
||||
@Excel(name = "驿站分类")
|
||||
private Long postType;
|
||||
|
||||
/**
|
||||
* 店铺清单
|
||||
*/
|
||||
@Excel(name = "店铺清单")
|
||||
private String shopList;
|
||||
|
||||
/**
|
||||
* 首页 URL
|
||||
*/
|
||||
@Excel(name = "首页 URL")
|
||||
private String homeUrl;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createAt;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateAt;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 项目 id
|
||||
*/
|
||||
private Long projId;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.huiyuan.mapper;
|
||||
|
||||
import com.ruoyi.system.huiyuan.domain.HyMemberDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 会员Mapper接口
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
public interface HyMemberDaoMapper extends BaseMapper<HyMemberDao> {
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.huiyuan.mapper;
|
||||
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 项目信息Mapper接口
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
public interface HyProjDaoMapper extends BaseMapper<HyProjDao> {
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.huiyuan.mapper;
|
||||
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjTalentDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 优才项目Mapper接口
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
public interface HyProjTalentDaoMapper extends BaseMapper<HyProjTalentDao> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.system.huiyuan.service;
|
||||
|
||||
import com.ruoyi.system.huiyuan.domain.HyMemberDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员Service接口
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
public interface IHyMemberDaoService extends IService<HyMemberDao> {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<HyMemberDao> queryList(HyMemberDao hyMemberDao);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.system.huiyuan.service;
|
||||
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目信息Service接口
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
public interface IHyProjDaoService extends IService<HyProjDao> {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<HyProjDao> queryList(HyProjDao hyProjDao);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.system.huiyuan.service;
|
||||
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjTalentDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优才项目Service接口
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
public interface IHyProjTalentDaoService extends IService<HyProjTalentDao> {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<HyProjTalentDao> queryList(HyProjTalentDao hyProjTalentDao);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.huiyuan.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.ruoyi.system.huiyuan.mapper.HyMemberDaoMapper;
|
||||
import com.ruoyi.system.huiyuan.domain.HyMemberDao;
|
||||
import com.ruoyi.system.huiyuan.service.IHyMemberDaoService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 会员Service业务层处理
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@Service
|
||||
public class HyMemberDaoServiceImpl extends ServiceImpl<HyMemberDaoMapper, HyMemberDao> implements IHyMemberDaoService {
|
||||
|
||||
@Override
|
||||
public List<HyMemberDao> queryList(HyMemberDao hyMemberDao) {
|
||||
LambdaQueryWrapper<HyMemberDao> lqw = Wrappers.lambdaQuery();
|
||||
if (StringUtils.isNotBlank(hyMemberDao.getTel())){
|
||||
lqw.eq(HyMemberDao::getTel ,hyMemberDao.getTel());
|
||||
}
|
||||
if (StringUtils.isNotBlank(hyMemberDao.getPassword())){
|
||||
lqw.eq(HyMemberDao::getPassword ,hyMemberDao.getPassword());
|
||||
}
|
||||
if (hyMemberDao.getProjType() != null){
|
||||
lqw.eq(HyMemberDao::getProjType ,hyMemberDao.getProjType());
|
||||
}
|
||||
if (hyMemberDao.getPoints() != null){
|
||||
lqw.eq(HyMemberDao::getPoints ,hyMemberDao.getPoints());
|
||||
}
|
||||
if (hyMemberDao.getVoucher() != null){
|
||||
lqw.eq(HyMemberDao::getVoucher ,hyMemberDao.getVoucher());
|
||||
}
|
||||
if (hyMemberDao.getBalance() != null){
|
||||
lqw.eq(HyMemberDao::getBalance ,hyMemberDao.getBalance());
|
||||
}
|
||||
if (StringUtils.isNotBlank(hyMemberDao.getDevice())){
|
||||
lqw.eq(HyMemberDao::getDevice ,hyMemberDao.getDevice());
|
||||
}
|
||||
if (StringUtils.isNotBlank(hyMemberDao.getMemberUrl())){
|
||||
lqw.eq(HyMemberDao::getMemberUrl ,hyMemberDao.getMemberUrl());
|
||||
}
|
||||
if (hyMemberDao.getCreateAt() != null){
|
||||
lqw.eq(HyMemberDao::getCreateAt ,hyMemberDao.getCreateAt());
|
||||
}
|
||||
if (hyMemberDao.getUpdateAt() != null){
|
||||
lqw.eq(HyMemberDao::getUpdateAt ,hyMemberDao.getUpdateAt());
|
||||
}
|
||||
if (hyMemberDao.getProjId() != null){
|
||||
lqw.eq(HyMemberDao::getProjId ,hyMemberDao.getProjId());
|
||||
}
|
||||
return this.list(lqw);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.system.huiyuan.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.ruoyi.system.huiyuan.mapper.HyProjDaoMapper;
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjDao;
|
||||
import com.ruoyi.system.huiyuan.service.IHyProjDaoService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 项目信息Service业务层处理
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@Service
|
||||
public class HyProjDaoServiceImpl extends ServiceImpl<HyProjDaoMapper, HyProjDao> implements IHyProjDaoService {
|
||||
|
||||
@Override
|
||||
public List<HyProjDao> queryList(HyProjDao hyProjDao) {
|
||||
LambdaQueryWrapper<HyProjDao> lqw = Wrappers.lambdaQuery();
|
||||
if (StringUtils.isNotBlank(hyProjDao.getProjName())){
|
||||
lqw.like(HyProjDao::getProjName ,hyProjDao.getProjName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(hyProjDao.getHomeUrl())){
|
||||
lqw.eq(HyProjDao::getHomeUrl ,hyProjDao.getHomeUrl());
|
||||
}
|
||||
if (hyProjDao.getCreateAt() != null){
|
||||
lqw.eq(HyProjDao::getCreateAt ,hyProjDao.getCreateAt());
|
||||
}
|
||||
if (hyProjDao.getUpdateAt() != null){
|
||||
lqw.eq(HyProjDao::getUpdateAt ,hyProjDao.getUpdateAt());
|
||||
}
|
||||
return this.list(lqw);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.huiyuan.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.ruoyi.system.huiyuan.mapper.HyProjTalentDaoMapper;
|
||||
import com.ruoyi.system.huiyuan.domain.HyProjTalentDao;
|
||||
import com.ruoyi.system.huiyuan.service.IHyProjTalentDaoService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优才项目Service业务层处理
|
||||
*
|
||||
* @author ryo
|
||||
* @date 2021-01-09
|
||||
*/
|
||||
@Service
|
||||
public class HyProjTalentDaoServiceImpl extends ServiceImpl<HyProjTalentDaoMapper, HyProjTalentDao> implements IHyProjTalentDaoService {
|
||||
|
||||
@Override
|
||||
public List<HyProjTalentDao> queryList(HyProjTalentDao hyProjTalentDao) {
|
||||
LambdaQueryWrapper<HyProjTalentDao> lqw = Wrappers.lambdaQuery();
|
||||
if (hyProjTalentDao.getPostType() != null){
|
||||
lqw.eq(HyProjTalentDao::getPostType ,hyProjTalentDao.getPostType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(hyProjTalentDao.getShopList())){
|
||||
lqw.eq(HyProjTalentDao::getShopList ,hyProjTalentDao.getShopList());
|
||||
}
|
||||
if (StringUtils.isNotBlank(hyProjTalentDao.getHomeUrl())){
|
||||
lqw.eq(HyProjTalentDao::getHomeUrl ,hyProjTalentDao.getHomeUrl());
|
||||
}
|
||||
if (hyProjTalentDao.getCreateAt() != null){
|
||||
lqw.eq(HyProjTalentDao::getCreateAt ,hyProjTalentDao.getCreateAt());
|
||||
}
|
||||
if (hyProjTalentDao.getUpdateAt() != null){
|
||||
lqw.eq(HyProjTalentDao::getUpdateAt ,hyProjTalentDao.getUpdateAt());
|
||||
}
|
||||
return this.list(lqw);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<?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.ruoyi.system.huiyuan.mapper.HyMemberDaoMapper">
|
||||
|
||||
<resultMap type="HyMemberDao" id="HyMemberDaoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="password" column="password" />
|
||||
<result property="projType" column="proj_type" />
|
||||
<result property="points" column="points" />
|
||||
<result property="voucher" column="voucher" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="device" column="device" />
|
||||
<result property="memberUrl" column="member_url" />
|
||||
<result property="createAt" column="create_at" />
|
||||
<result property="updateAt" column="update_at" />
|
||||
<result property="projId" column="proj_id" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
<?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.ruoyi.system.huiyuan.mapper.HyProjDaoMapper">
|
||||
|
||||
<resultMap type="HyProjDao" id="HyProjDaoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projName" column="proj_name" />
|
||||
<result property="homeUrl" column="home_url" />
|
||||
<result property="createAt" column="create_at" />
|
||||
<result property="updateAt" column="update_at" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,18 @@
|
||||
<?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.ruoyi.system.huiyuan.mapper.HyProjTalentDaoMapper">
|
||||
|
||||
<resultMap type="HyProjTalentDao" id="HyProjTalentDaoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="postType" column="post_type"/>
|
||||
<result property="shopList" column="shop_list"/>
|
||||
<result property="homeUrl" column="home_url"/>
|
||||
<result property="createAt" column="create_at"/>
|
||||
<result property="updateAt" column="update_at"/>
|
||||
<result property="projId" column="proj_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user