渠道商
This commit is contained in:
parent
ad959443ab
commit
896696390a
|
@ -262,4 +262,12 @@ public class UserEntity implements Serializable {
|
||||||
|
|
||||||
private String blYwyCode;
|
private String blYwyCode;
|
||||||
|
|
||||||
|
private Integer blIsQds;
|
||||||
|
|
||||||
|
private String blQdsCode;
|
||||||
|
|
||||||
|
private Integer blIsDls;
|
||||||
|
|
||||||
|
private String blDlsCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,6 +360,9 @@ public class UserMoneyDetailsServiceImpl extends ServiceImpl<UserMoneyDetailsDao
|
||||||
case 7:
|
case 7:
|
||||||
queryWrapper.eq("bl_role", 7);//代理
|
queryWrapper.eq("bl_role", 7);//代理
|
||||||
break;
|
break;
|
||||||
|
case 8:
|
||||||
|
queryWrapper.eq("bl_role", 8);//代理
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if(StringUtil.isNotEmpty(period.getStartFundData().toString())){
|
// if(StringUtil.isNotEmpty(period.getStartFundData().toString())){
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.controller;
|
||||||
|
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsApply;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsApplyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/commission/qdsApply")
|
||||||
|
@Api(value = "分佣管理", tags = {"渠道商申请"})
|
||||||
|
public class QdsApplyController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsApplyService service;
|
||||||
|
|
||||||
|
@GetMapping("/findPage")
|
||||||
|
@ApiOperation("查询(分页)")
|
||||||
|
public Result findPage(QdsApply qdsApply){
|
||||||
|
return service.findPage(qdsApply);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("添加")
|
||||||
|
public Result add(QdsApply qdsApply){
|
||||||
|
service.add(qdsApply);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/update")
|
||||||
|
@ApiOperation("修改")
|
||||||
|
public Result update(QdsApply qdsApply){
|
||||||
|
service.update(qdsApply);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@ApiOperation("删除")
|
||||||
|
public Result delete(QdsApply qdsApply){
|
||||||
|
service.removeById(qdsApply.getId());
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/approve")
|
||||||
|
@ApiOperation("审批")
|
||||||
|
public Result approve(QdsApply qdsApply){
|
||||||
|
service.approve(qdsApply);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/findUserPage")
|
||||||
|
@ApiOperation("查询(分页)")
|
||||||
|
public Result findUserPage(QdsApply qdsApply){
|
||||||
|
return service.findUserPage(qdsApply);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.controller;
|
||||||
|
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsCode;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsCodeService;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsLmService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/commission/qdsCode")
|
||||||
|
@Api(value = "分佣管理", tags = {"渠道商渠道码"})
|
||||||
|
public class QdsCodeController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsCodeService service;
|
||||||
|
@Autowired
|
||||||
|
private QdsLmService lmService;
|
||||||
|
|
||||||
|
@GetMapping("/lmList")
|
||||||
|
@ApiOperation("类目列表")
|
||||||
|
public Result lmList(){
|
||||||
|
return lmService.findList(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/findPage")
|
||||||
|
@ApiOperation("查询(分页)")
|
||||||
|
public Result findPage(QdsCode qdsCode){
|
||||||
|
return service.findPage(qdsCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("添加")
|
||||||
|
public Result add(QdsCode qdsCode){
|
||||||
|
service.add(qdsCode);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/update")
|
||||||
|
@ApiOperation("修改")
|
||||||
|
public Result update(QdsCode qdsCode){
|
||||||
|
service.update(qdsCode);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@ApiOperation("删除")
|
||||||
|
public Result delete(QdsCode qdsCode){
|
||||||
|
service.removeById(qdsCode.getId());
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/findUserPage")
|
||||||
|
@ApiOperation("查询用户(分页)")
|
||||||
|
public Result findUserPage(QdsCode qdsCode){
|
||||||
|
return service.findUserPage(qdsCode);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsConfig;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsConfigService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/commission/qdsConfig")
|
||||||
|
@Api(value = "分佣管理", tags = {"渠道商配置"})
|
||||||
|
public class QdsConfigController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsConfigService service;
|
||||||
|
|
||||||
|
@GetMapping("/info")
|
||||||
|
@ApiOperation("查询渠道商配置")
|
||||||
|
public Result info(QdsConfig qdsConfig){
|
||||||
|
QdsConfig entity = service.getById(qdsConfig);
|
||||||
|
if(entity == null){
|
||||||
|
entity = service.getOne(new QueryWrapper<QdsConfig>());
|
||||||
|
}
|
||||||
|
return Result.success().put("data",entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/save")
|
||||||
|
@ApiOperation("添加渠道商")
|
||||||
|
public Result save(QdsConfig qdsConfig){
|
||||||
|
QdsConfig entity = service.getById(qdsConfig);
|
||||||
|
if(entity!=null){
|
||||||
|
service.updateById(qdsConfig);
|
||||||
|
}else{
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
qdsConfig.setCreateTime(sdf.format(new Date()));
|
||||||
|
service.save(qdsConfig);
|
||||||
|
}
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.controller;
|
||||||
|
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsData;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsDataService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/commission/qdsData")
|
||||||
|
@Api(value = "分佣管理", tags = {"渠道商数据"})
|
||||||
|
public class QdsDataController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsDataService service;
|
||||||
|
|
||||||
|
@GetMapping("/findPage")
|
||||||
|
@ApiOperation("查询(分页)")
|
||||||
|
public Result findPage(QdsData qdsData){
|
||||||
|
return service.findPage(qdsData);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/invitationPage")
|
||||||
|
@ApiOperation("邀请用户(分页)")
|
||||||
|
public Result invitationPage(QdsData qdsData){
|
||||||
|
return service.invitationPage(qdsData);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.controller;
|
||||||
|
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsLm;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsLmService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
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.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/commission/qdsLm")
|
||||||
|
@Api(value = "分佣管理", tags = {"渠道商类目"})
|
||||||
|
public class QdsLmController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsLmService service;
|
||||||
|
|
||||||
|
@GetMapping("/findPage")
|
||||||
|
@ApiOperation("查询(分页)")
|
||||||
|
public Result findPage(QdsLm qdsLm){
|
||||||
|
return service.findPage(qdsLm);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("添加类目")
|
||||||
|
public Result add(QdsLm qdsLm){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
qdsLm.setCreateTime(sdf.format(new Date()));
|
||||||
|
service.save(qdsLm);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/modify")
|
||||||
|
@ApiOperation("修改类目")
|
||||||
|
public Result modify(QdsLm qdsLm){
|
||||||
|
service.updateById(qdsLm);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@ApiOperation("删除类目")
|
||||||
|
public Result delete(QdsLm qdsLm){
|
||||||
|
service.removeById(qdsLm.getId());
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.controller.app;
|
||||||
|
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.app.annotation.Login;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsApply;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsApplyService;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsDataService;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsLmService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/commission/qds")
|
||||||
|
@Api(value = "分佣管理", tags = {"渠道商管理app"})
|
||||||
|
public class AppQdsController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsLmService lmService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsApplyService applyService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QdsDataService dataService;
|
||||||
|
|
||||||
|
@GetMapping("/lmList")
|
||||||
|
@ApiOperation("类目列表")
|
||||||
|
public Result lmList(){
|
||||||
|
return lmService.findList(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Login
|
||||||
|
@GetMapping("/apply")
|
||||||
|
@ApiOperation("申请渠道商")
|
||||||
|
public Result apply(@RequestAttribute Long userId, String name, String phone, String lm, String remarks){
|
||||||
|
QdsApply entity = applyService.findByUserId(userId);
|
||||||
|
if(entity!=null){
|
||||||
|
if(entity.getStatus().equals(0)){
|
||||||
|
return Result.error("申请审批中");
|
||||||
|
}
|
||||||
|
if(entity.getStatus().equals(1)){
|
||||||
|
return Result.error("申请审批通过,请重新登录");
|
||||||
|
}
|
||||||
|
if(entity.getStatus().equals(2)){
|
||||||
|
return Result.error("申请审批被驳回,驳回原因如下:"+entity.getOpinion());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QdsApply qdsApply = new QdsApply();
|
||||||
|
qdsApply.setUserId(userId);
|
||||||
|
qdsApply.setName(name);
|
||||||
|
qdsApply.setPhone(phone);
|
||||||
|
qdsApply.setLm(lm);
|
||||||
|
qdsApply.setRemarks(remarks);
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
qdsApply.setCreateTime(sdf.format(new Date()));
|
||||||
|
applyService.add(qdsApply);
|
||||||
|
return Result.success("申请成功,等待审批");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Login
|
||||||
|
@GetMapping("/myQds")
|
||||||
|
@ApiOperation("我是渠道商")
|
||||||
|
public Result myQds(@RequestAttribute Long userId){
|
||||||
|
return dataService.myQds(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.sqx.modules.bl.commission.jjr.entity.JjrApply;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsApply;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface QdsApplyDao extends BaseMapper<QdsApply> {
|
||||||
|
QdsApply findByUserId(Long userId);
|
||||||
|
int add(QdsApply qdsApply);
|
||||||
|
int update(QdsApply qdsApply);
|
||||||
|
int approve(QdsApply qdsApply);
|
||||||
|
IPage<QdsApply> findUserPage(Page<QdsApply> page, @Param("params") QdsApply qdsApply);
|
||||||
|
IPage<QdsApply> findPage(Page<QdsApply> page, @Param("params") QdsApply qdsApply);
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsCode;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface QdsCodeDao extends BaseMapper<QdsCode> {
|
||||||
|
IPage<QdsCode> findPage(Page<QdsCode> page, @Param("params") QdsCode qdsCode);
|
||||||
|
int add(QdsCode qdsCode);
|
||||||
|
int update(QdsCode qdsCode);
|
||||||
|
IPage<QdsCode> findUserPage(Page<QdsCode> page, @Param("params") QdsCode qdsCode);
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsConfig;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface QdsConfigDao extends BaseMapper<QdsConfig> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsData;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface QdsDataDao extends BaseMapper<QdsData> {
|
||||||
|
IPage<QdsData> findPage(Page<QdsData> page, @Param("params") QdsData qdsData);
|
||||||
|
IPage<QdsData> invitationUserPage(Page<QdsData> page, @Param("params") QdsData qdsData);
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsLm;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface QdsLmDao extends BaseMapper<QdsLm> {
|
||||||
|
IPage<QdsLm> findPage(Page<QdsLm> page, @Param("params") QdsLm qdsLm);
|
||||||
|
List<QdsLm> findList(QdsLm qdsLm);
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description bl_qds_apply
|
||||||
|
* 渠道商申请表
|
||||||
|
* @author caolei
|
||||||
|
* @date 2024-08-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_qds_apply")
|
||||||
|
public class QdsApply implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
*用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
*姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
*电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
/**
|
||||||
|
*类目
|
||||||
|
*/
|
||||||
|
private String lm;
|
||||||
|
/**
|
||||||
|
*头像
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String avatar;
|
||||||
|
/**
|
||||||
|
*昵称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
*邀请码
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String invitationCode;
|
||||||
|
/**
|
||||||
|
*备注
|
||||||
|
*/
|
||||||
|
private String remarks;
|
||||||
|
/**
|
||||||
|
*状态
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
*审批意见
|
||||||
|
*/
|
||||||
|
private String opinion;
|
||||||
|
/**
|
||||||
|
*创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
/**
|
||||||
|
*审批时间
|
||||||
|
*/
|
||||||
|
private String approveTime;
|
||||||
|
/**
|
||||||
|
*审批人
|
||||||
|
*/
|
||||||
|
private Long approveUser;
|
||||||
|
/**
|
||||||
|
*开始时间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String startTime;
|
||||||
|
/**
|
||||||
|
*结束时间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer userPage;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer userLimit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*比例
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal rate;
|
||||||
|
|
||||||
|
public QdsApply() {}
|
||||||
|
}
|
|
@ -0,0 +1,111 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description bl_qds_code
|
||||||
|
* 渠道商渠道码表
|
||||||
|
* @author caolei
|
||||||
|
* @date 2024-11-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_qds_code")
|
||||||
|
public class QdsCode implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
*用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
*姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
*编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
/**
|
||||||
|
*类目
|
||||||
|
*/
|
||||||
|
private Long lm;
|
||||||
|
/**
|
||||||
|
*渠道分成
|
||||||
|
*/
|
||||||
|
private BigDecimal rate;
|
||||||
|
/**
|
||||||
|
*成本
|
||||||
|
*/
|
||||||
|
private BigDecimal cost;
|
||||||
|
/**
|
||||||
|
*开始日期
|
||||||
|
*/
|
||||||
|
private String startDate;
|
||||||
|
/**
|
||||||
|
*结束日期
|
||||||
|
*/
|
||||||
|
private String endDate;
|
||||||
|
/**
|
||||||
|
*投放地
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
/**
|
||||||
|
*备注
|
||||||
|
*/
|
||||||
|
private String remarks;
|
||||||
|
/**
|
||||||
|
*渠道码
|
||||||
|
*/
|
||||||
|
private String codeImage;
|
||||||
|
/**
|
||||||
|
*创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
/**
|
||||||
|
*渠道商
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String qdsName;
|
||||||
|
/**
|
||||||
|
*头像
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String avatar;
|
||||||
|
/**
|
||||||
|
*昵称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
*昵称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer userPage;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer userLimit;
|
||||||
|
|
||||||
|
public QdsCode() {}
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description bl_qds_config
|
||||||
|
* 渠道商配置表
|
||||||
|
* @author caolei
|
||||||
|
* @date 2024-11-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_qds_config")
|
||||||
|
public class QdsConfig implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
*是否启用 1启用 0关闭
|
||||||
|
*/
|
||||||
|
private Integer isOpen;
|
||||||
|
/**
|
||||||
|
*渠道商申请入口 1启用 0关闭
|
||||||
|
*/
|
||||||
|
private Integer isApply;
|
||||||
|
/**
|
||||||
|
*渠道商返佣比例
|
||||||
|
*/
|
||||||
|
private BigDecimal rate;
|
||||||
|
/**
|
||||||
|
*技师承担
|
||||||
|
*/
|
||||||
|
private BigDecimal artificerRate;
|
||||||
|
/**
|
||||||
|
*代理商承担
|
||||||
|
*/
|
||||||
|
private BigDecimal agentRate;
|
||||||
|
/**
|
||||||
|
*邀请技师推广海报背景图
|
||||||
|
*/
|
||||||
|
private String artificerImage;
|
||||||
|
/**
|
||||||
|
*创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
public QdsConfig() {}
|
||||||
|
}
|
|
@ -0,0 +1,126 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description bl_fxy_data
|
||||||
|
* 分销员数据
|
||||||
|
* @author caolei
|
||||||
|
* @date 2024-08-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QdsData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
*渠道码名称
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String qdmName;
|
||||||
|
/**
|
||||||
|
*渠道码
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String qdsCode;
|
||||||
|
/**
|
||||||
|
*渠道商
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String qdsName;
|
||||||
|
/**
|
||||||
|
*类目
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long lm;
|
||||||
|
/**
|
||||||
|
*开始时间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String startTime;
|
||||||
|
/**
|
||||||
|
*结束时间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endTime;
|
||||||
|
/**
|
||||||
|
*绑定人员
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String userName;
|
||||||
|
/**
|
||||||
|
*渠道分成比列
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal rate;
|
||||||
|
/**
|
||||||
|
*扫码数量
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer smCount;
|
||||||
|
/**
|
||||||
|
*当日成交订单数量
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer ordersCount;
|
||||||
|
/**
|
||||||
|
*累计获得佣金
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private BigDecimal money;
|
||||||
|
/**
|
||||||
|
*创建时间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String createTime;
|
||||||
|
/**
|
||||||
|
*邀请用户
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String invitationName;
|
||||||
|
/**
|
||||||
|
*邀请用户手机
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String invitationPhone;
|
||||||
|
/**
|
||||||
|
*用户ID
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long userId;
|
||||||
|
/**
|
||||||
|
*头像
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String avatar;
|
||||||
|
/**
|
||||||
|
*姓名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
*电话
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
public QdsData() {}
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description bl_qds_lm
|
||||||
|
* 渠道商类目
|
||||||
|
* @author caolei
|
||||||
|
* @date 2024-08-03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_qds_lm")
|
||||||
|
public class QdsLm implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 类目名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer page;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
public QdsLm() {}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsApply;
|
||||||
|
|
||||||
|
public interface QdsApplyService extends IService<QdsApply> {
|
||||||
|
QdsApply findByUserId(Long userId);
|
||||||
|
int add(QdsApply qdsApply);
|
||||||
|
int update(QdsApply qdsApply);
|
||||||
|
void approve(QdsApply qdsApply);
|
||||||
|
Result findUserPage(QdsApply qdsApply);
|
||||||
|
Result findPage(QdsApply qdsApply);
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsCode;
|
||||||
|
|
||||||
|
public interface QdsCodeService extends IService<QdsCode> {
|
||||||
|
Result findPage(QdsCode qdsCode);
|
||||||
|
int add(QdsCode qdsCode);
|
||||||
|
int update(QdsCode qdsCode);
|
||||||
|
Result findUserPage(QdsCode qdsCode);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsConfig;
|
||||||
|
|
||||||
|
public interface QdsConfigService extends IService<QdsConfig> {
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsData;
|
||||||
|
|
||||||
|
public interface QdsDataService extends IService<QdsData> {
|
||||||
|
Result findPage(QdsData qdsData);
|
||||||
|
Result invitationPage(QdsData qdsData);
|
||||||
|
Result myQds(Long userId);
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsLm;
|
||||||
|
|
||||||
|
public interface QdsLmService extends IService<QdsLm> {
|
||||||
|
Result findPage(QdsLm qdsLm);
|
||||||
|
Result findList(QdsLm qdsLm);
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.sqx.common.utils.PageUtils;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.app.entity.UserEntity;
|
||||||
|
import com.sqx.modules.app.service.UserService;
|
||||||
|
import com.sqx.modules.bl.commission.qds.dao.QdsApplyDao;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsApply;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsApplyService;
|
||||||
|
import com.sqx.modules.sys.entity.SysUserEntity;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DqsApplyServiceImpl extends ServiceImpl<QdsApplyDao, QdsApply> implements QdsApplyService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QdsApply findByUserId(Long userId){
|
||||||
|
return baseMapper.findByUserId(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int add(QdsApply qdsApply){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
qdsApply.setCreateTime(sdf.format(new Date()));
|
||||||
|
qdsApply.setStatus(0);
|
||||||
|
return baseMapper.add(qdsApply);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int update(QdsApply qdsApply){
|
||||||
|
return baseMapper.update(qdsApply);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void approve(QdsApply qdsApply){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
qdsApply.setApproveTime(sdf.format(new Date()));
|
||||||
|
qdsApply.setApproveUser(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUserId());
|
||||||
|
UserEntity userEntity = userService.selectUserById(qdsApply.getUserId());
|
||||||
|
if(qdsApply.getStatus().equals(1)){
|
||||||
|
userEntity.setBlIsQds(1);
|
||||||
|
}else{
|
||||||
|
userEntity.setBlIsQds(0);
|
||||||
|
}
|
||||||
|
userService.updateById(userEntity);
|
||||||
|
baseMapper.approve(qdsApply);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findUserPage(QdsApply qdsApply){
|
||||||
|
Page<QdsApply> pages=new Page<>(qdsApply.getUserPage(),qdsApply.getUserLimit());
|
||||||
|
return Result.success().put("data",new PageUtils(baseMapper.findUserPage(pages,qdsApply)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findPage(QdsApply qdsApply){
|
||||||
|
Page<QdsApply> pages=new Page<>(qdsApply.getPage(),qdsApply.getLimit());
|
||||||
|
return Result.success().put("data",new PageUtils(baseMapper.findPage(pages,qdsApply)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.sqx.common.utils.PageUtils;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.dao.QdsCodeDao;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsCode;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsCodeService;
|
||||||
|
import com.sqx.modules.common.service.CommonInfoService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DqsCodeServiceImpl extends ServiceImpl<QdsCodeDao, QdsCode> implements QdsCodeService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CommonInfoService commonRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findPage(QdsCode qdsCode){
|
||||||
|
Page<QdsCode> pages=new Page<>(qdsCode.getPage(),qdsCode.getLimit());
|
||||||
|
return Result.success().put("data",new PageUtils(baseMapper.findPage(pages,qdsCode)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int add(QdsCode qdsCode){
|
||||||
|
Date date = new Date();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
qdsCode.setCreateTime(sdf.format(date));
|
||||||
|
String code = String.valueOf(date.getTime());
|
||||||
|
qdsCode.setCode(code);
|
||||||
|
String codeImage = genOrGetQrCodePath(code);
|
||||||
|
qdsCode.setCodeImage(codeImage);
|
||||||
|
return baseMapper.add(qdsCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int update(QdsCode qdsCode){
|
||||||
|
return baseMapper.update(qdsCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findUserPage(QdsCode qdsCode){
|
||||||
|
Page<QdsCode> pages=new Page<>(qdsCode.getUserPage(),qdsCode.getUserLimit());
|
||||||
|
return Result.success().put("data",new PageUtils(baseMapper.findUserPage(pages,qdsCode)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String genOrGetQrCodePath(String code) {
|
||||||
|
//去附件里找有没有
|
||||||
|
String http = commonRepository.findOne(19).getValue();
|
||||||
|
String[] split = http.split("://");
|
||||||
|
// 上传文件路径
|
||||||
|
String baseAudioUploadPath = "/www/wwwroot/"+split[1]+"/file/uploadPath";
|
||||||
|
|
||||||
|
String baseFilePath = baseAudioUploadPath + "/" + "QrCode" + "/";
|
||||||
|
//创建文件
|
||||||
|
String filePath = baseFilePath + code + ".jpg";
|
||||||
|
|
||||||
|
File QRCodeFile = FileUtil.file(filePath);
|
||||||
|
//判断文件存不存在
|
||||||
|
if(!FileUtil.exist(filePath)){
|
||||||
|
//生成并保存并返回二维码
|
||||||
|
FileUtil.touch(filePath);
|
||||||
|
//获取前台地址
|
||||||
|
QrCodeUtil.generate(commonRepository.findOne(19).getValue() + "/pages/public/login?blQdsCode=" + code, 300, 300, QRCodeFile);
|
||||||
|
}
|
||||||
|
//返回可访问地址
|
||||||
|
String url = StringUtils.replace(filePath,"/www/wwwroot/"+split[1],http);
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.sqx.modules.bl.commission.qds.dao.QdsConfigDao;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsConfig;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsConfigService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QdsConfigServiceImpl extends ServiceImpl<QdsConfigDao, QdsConfig> implements QdsConfigService {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,108 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||||
|
import com.sqx.modules.app.service.UserMoneyDetailsService;
|
||||||
|
import com.sqx.modules.artificer.entity.Period;
|
||||||
|
import com.sqx.modules.bl.commission.qds.dao.QdsDataDao;
|
||||||
|
import com.sqx.modules.utils.PeriodUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.sqx.common.utils.PageUtils;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsData;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsDataService;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QdsDataServiceImpl extends ServiceImpl<QdsDataDao, QdsData> implements QdsDataService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserMoneyDetailsService userMoneyDetailsService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findPage(QdsData qdsData){
|
||||||
|
Page<QdsData> pages=new Page<>(qdsData.getPage(),qdsData.getLimit());
|
||||||
|
return Result.success().put("data",new PageUtils(baseMapper.findPage(pages,qdsData)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result invitationPage(QdsData qdsData){
|
||||||
|
Page<QdsData> pages=new Page<>(qdsData.getPage(),qdsData.getLimit());
|
||||||
|
IPage<QdsData> iPage = baseMapper.invitationUserPage(pages,qdsData);
|
||||||
|
return Result.success().put("data",new PageUtils(iPage));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result myQds(Long userId){
|
||||||
|
Map<String,Object> result=new HashMap<>();
|
||||||
|
//可提现
|
||||||
|
Date CurrentPeriod = new Date();//获取当前时间
|
||||||
|
//获取当前时间周期的上一个周期
|
||||||
|
Period periodDate= PeriodUtil.previousIssue(CurrentPeriod);
|
||||||
|
Period period = new Period();
|
||||||
|
period.setArtificerId(String.valueOf(userId));
|
||||||
|
period.setDetailsType(1);
|
||||||
|
period.setEndFundData(periodDate.getEndFundData());
|
||||||
|
period.setFundType(8);//渠道商
|
||||||
|
List<UserMoneyDetails> filteredPersons = userMoneyDetailsService.selectIncome(period);
|
||||||
|
//进账
|
||||||
|
double incomeLong= filteredPersons.stream()
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getType() == 1)
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getState() == 2)
|
||||||
|
.mapToDouble(UserMoneyDetails -> UserMoneyDetails.getMoney().doubleValue())
|
||||||
|
.sum();
|
||||||
|
//出账
|
||||||
|
double outgoingLong= filteredPersons.stream()
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getType() == 2)
|
||||||
|
// .filter(UserMoneyDetails -> UserMoneyDetails.getState() == 2)
|
||||||
|
.filter(UserMoneyDetails -> !UserMoneyDetails.getContent().contains("管理端减少"))
|
||||||
|
.mapToDouble(UserMoneyDetails -> UserMoneyDetails.getMoney().doubleValue())
|
||||||
|
.sum();
|
||||||
|
BigDecimal incomeMoney= BigDecimal.valueOf(incomeLong).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||||
|
BigDecimal outgoingMoney = BigDecimal.valueOf(outgoingLong).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||||
|
BigDecimal withdrawableAmount = incomeMoney.subtract(outgoingMoney).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||||
|
result.put("withdrawableAmount",withdrawableAmount);//可提现金额
|
||||||
|
//累计佣金
|
||||||
|
Period period2 = new Period();
|
||||||
|
period2.setArtificerId(String.valueOf(userId));
|
||||||
|
period2.setDetailsType(1);
|
||||||
|
period2.setFundType(8);//渠道商
|
||||||
|
List<UserMoneyDetails> filteredPersons2 = userMoneyDetailsService.selectIncome(period2);
|
||||||
|
double income= filteredPersons2.stream()
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getType() == 1)
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getState() == 2)
|
||||||
|
.mapToDouble(UserMoneyDetails -> UserMoneyDetails.getMoney().doubleValue())
|
||||||
|
.sum();
|
||||||
|
result.put("income",income);//累计佣金
|
||||||
|
//已提现金额
|
||||||
|
double withdrawal=0;
|
||||||
|
for(int i=0;i<filteredPersons2.size();i++){
|
||||||
|
UserMoneyDetails umd = filteredPersons2.get(i);
|
||||||
|
if(umd.getType() == 2 && umd.getState() == 2 ){
|
||||||
|
if(umd.getClassify() !=null && umd.getClassify() == 3){
|
||||||
|
withdrawal += umd.getMoney().doubleValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.put("withdrawal",withdrawal);//已提现金额
|
||||||
|
double notCredited = filteredPersons2.stream()
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getType() == 1)
|
||||||
|
.filter(UserMoneyDetails -> UserMoneyDetails.getState() == 1)
|
||||||
|
.mapToDouble(UserMoneyDetails -> UserMoneyDetails.getMoney().doubleValue())
|
||||||
|
.sum();
|
||||||
|
result.put("notCredited",notCredited);//未入账
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return Result.success().put("data",result);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.sqx.modules.bl.commission.qds.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.sqx.common.utils.PageUtils;
|
||||||
|
import com.sqx.common.utils.Result;
|
||||||
|
import com.sqx.modules.bl.commission.qds.dao.QdsLmDao;
|
||||||
|
import com.sqx.modules.bl.commission.qds.entity.QdsLm;
|
||||||
|
import com.sqx.modules.bl.commission.qds.service.QdsLmService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QdsLmServiceImpl extends ServiceImpl<QdsLmDao, QdsLm> implements QdsLmService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findPage(QdsLm qdsLm){
|
||||||
|
Page<QdsLm> pages=new Page<>(qdsLm.getPage(),qdsLm.getLimit());
|
||||||
|
return Result.success().put("data",new PageUtils(baseMapper.findPage(pages,qdsLm)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result findList(QdsLm qdsLm){
|
||||||
|
return Result.success().put("data",baseMapper.findList(qdsLm));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?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.sqx.modules.bl.commission.qds.dao.QdsApplyDao">
|
||||||
|
|
||||||
|
<select id="findByUserId" resultType="com.sqx.modules.bl.commission.qds.entity.QdsApply">
|
||||||
|
select a.*
|
||||||
|
from bl_qds_apply a
|
||||||
|
where user_id = #{userId}
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="add" useGeneratedKeys="true" keyProperty="id" parameterType="com.sqx.modules.bl.commission.qds.entity.QdsApply">
|
||||||
|
insert into bl_qds_apply(user_id,name,phone,lm,remarks,create_time,status)
|
||||||
|
values(#{userId},#{name},#{phone},#{lm},#{remarks},#{createTime},0)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="update" parameterType="com.sqx.modules.bl.commission.qds.entity.QdsApply">
|
||||||
|
update bl_qds_apply
|
||||||
|
set
|
||||||
|
user_id=#{userId},
|
||||||
|
name=#{name},
|
||||||
|
phone=#{phone},
|
||||||
|
lm=#{lm},
|
||||||
|
remarks=#{remarks}
|
||||||
|
where id=#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="approve" parameterType="com.sqx.modules.bl.commission.qds.entity.QdsApply">
|
||||||
|
update bl_qds_apply
|
||||||
|
set status=#{status},
|
||||||
|
opinion=#{opinion},
|
||||||
|
approve_time=#{approveTime},
|
||||||
|
approve_user=#{approveUser}
|
||||||
|
where id=#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="findUserPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsApply">
|
||||||
|
select b.user_id,b.avatar,b.user_name,b.phone,b.invitation_code
|
||||||
|
from tb_user b
|
||||||
|
where b.status = 1
|
||||||
|
and b.user_id not in (
|
||||||
|
select a.user_id
|
||||||
|
from bl_qds_apply a
|
||||||
|
where a.status != 2
|
||||||
|
)
|
||||||
|
<if test="params.userName!=null and params.userName!=''">
|
||||||
|
and b.user_name like concat('%',#{params.userName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.phone!=null and params.phone!=''">
|
||||||
|
and b.phone like concat('%',#{params.phone},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.invitationCode!=null and params.invitationCode!=''">
|
||||||
|
and b.invitation_code like concat('%',#{params.invitationCode},'%')
|
||||||
|
</if>
|
||||||
|
order by b.user_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsApply">
|
||||||
|
select a.id,a.user_id,b.avatar,b.user_name,a.name,a.phone,a.remarks,a.lm,a.create_time,a.status,a.opinion
|
||||||
|
from bl_qds_apply a
|
||||||
|
inner join tb_user b on a.user_id = b.user_id
|
||||||
|
where 1=1
|
||||||
|
<if test="params.status!=null">
|
||||||
|
and a.status=#{params.status}
|
||||||
|
</if>
|
||||||
|
<if test="params.name!=null and params.name!=''">
|
||||||
|
and a.name like concat('%',#{params.name},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.phone!=null and params.phone!=''">
|
||||||
|
and a.phone like concat('%',#{params.phone},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.lm!=null and params.lm!=''">
|
||||||
|
and a.lm like concat('%',#{params.lm},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.startTime!=null and params.startTime!=''">
|
||||||
|
and a.create_time >= #{params.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="params.endTime!=null and params.endTime!=''">
|
||||||
|
and a.create_time <= #{params.endTime}
|
||||||
|
</if>
|
||||||
|
order by id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,89 @@
|
||||||
|
<?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.sqx.modules.bl.commission.qds.dao.QdsCodeDao">
|
||||||
|
|
||||||
|
<select id="findPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsCode">
|
||||||
|
select
|
||||||
|
a.id,
|
||||||
|
a.name,
|
||||||
|
a.code,
|
||||||
|
a.lm,
|
||||||
|
a.user_id as userId,
|
||||||
|
b.user_name as userName,
|
||||||
|
b.phone,
|
||||||
|
b.avatar,
|
||||||
|
c.name as qdsName,
|
||||||
|
a.rate,
|
||||||
|
a.cost,
|
||||||
|
a.start_date as startDate,
|
||||||
|
a.end_date as endDate,
|
||||||
|
a.address,
|
||||||
|
a.create_time as createTime,
|
||||||
|
a.remarks,
|
||||||
|
a.code_image as codeImage
|
||||||
|
from bl_qds_code a
|
||||||
|
left join tb_user b on a.user_id = b.user_id
|
||||||
|
left join bl_qds_apply c on a.user_id = c.user_id
|
||||||
|
where 1=1
|
||||||
|
<if test="params.name!=null and params.name!=''">
|
||||||
|
and a.name like concat('%',#{params.name},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.code!=null and params.code!=''">
|
||||||
|
and a.code like concat('%',#{params.code},'%')
|
||||||
|
</if>
|
||||||
|
order by a.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="add" useGeneratedKeys="true" keyProperty="id" parameterType="com.sqx.modules.bl.commission.qds.entity.QdsCode">
|
||||||
|
insert into bl_qds_code(
|
||||||
|
name,
|
||||||
|
code,
|
||||||
|
lm,
|
||||||
|
user_id,
|
||||||
|
rate,
|
||||||
|
cost,
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
address,
|
||||||
|
create_time,
|
||||||
|
remarks,
|
||||||
|
code_image
|
||||||
|
)
|
||||||
|
values(#{name},#{code},#{lm},#{userId},#{rate},#{cost},#{startDate},#{endDate},#{address},#{createTime},#{remarks},#{codeImage})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="update" parameterType="com.sqx.modules.bl.commission.qds.entity.QdsCode">
|
||||||
|
update bl_qds_code
|
||||||
|
set
|
||||||
|
name=#{name},
|
||||||
|
lm=#{lm},
|
||||||
|
user_id=#{userId},
|
||||||
|
rate=#{rate},
|
||||||
|
cost=#{cost},
|
||||||
|
address=#{address},
|
||||||
|
start_date=#{startDate},
|
||||||
|
end_date=#{endDate},
|
||||||
|
remarks=#{remarks}
|
||||||
|
where id=#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="findUserPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsCode">
|
||||||
|
select b.user_id,b.avatar,b.user_name,b.phone
|
||||||
|
from tb_user b
|
||||||
|
where b.status = 1
|
||||||
|
and b.user_id in (
|
||||||
|
select a.user_id
|
||||||
|
from bl_qds_apply a
|
||||||
|
where a.status = 1
|
||||||
|
)
|
||||||
|
<if test="params.userName!=null and params.userName!=''">
|
||||||
|
and b.user_name like concat('%',#{params.userName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.phone!=null and params.phone!=''">
|
||||||
|
and b.phone like concat('%',#{params.phone},'%')
|
||||||
|
</if>
|
||||||
|
order by b.user_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?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.sqx.modules.bl.commission.qds.dao.QdsDataDao">
|
||||||
|
|
||||||
|
<select id="findPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsData">
|
||||||
|
select bqc.id,bqc.name as qdmName,bqc.code as qdsCode,bqc.lm,y.user_name as userName,x.name as qdsName,bqc.rate,
|
||||||
|
bqc.start_date as startTime,bqc.end_date as endTime,bqc.create_time as createTime,
|
||||||
|
ifnull((select count(*) from tb_user ac where ac.bl_qds_code = bqc.code and ifnull(bl_is_qds,0) = 0),0) as smCount,
|
||||||
|
ifnull(t1.ordersCount,0) as ordersCount,
|
||||||
|
ifnull(t3.money,0) as money
|
||||||
|
from bl_qds_code bqc
|
||||||
|
inner join bl_qds_apply x on bqc.user_id = x.user_id and x.status = 1
|
||||||
|
inner join tb_user y on x.user_id = y.user_id
|
||||||
|
left join (
|
||||||
|
select count(*) as ordersCount, aa.user_id, bb.bl_qds_code
|
||||||
|
from (
|
||||||
|
select o1.orders_id,o1.user_id
|
||||||
|
from orders o1
|
||||||
|
left join orders o2 on o1.old_orders_id = o2.orders_id and o2.status != 4
|
||||||
|
left join orders o3 on o2.old_orders_id = o3.orders_id and o3.status != 4
|
||||||
|
where o1.old_orders_id is not null
|
||||||
|
and o1.status in (3,5)
|
||||||
|
union all
|
||||||
|
select o1.orders_id,o1.user_id
|
||||||
|
from orders o1
|
||||||
|
where o1.parent_id = 0
|
||||||
|
and o1.old_orders_id is null
|
||||||
|
and o1.orders_id not in (
|
||||||
|
select orders_id from orders
|
||||||
|
where old_orders_id is not null
|
||||||
|
and status != 4
|
||||||
|
)
|
||||||
|
and o1.orders_id not in (
|
||||||
|
select old_orders_id from orders
|
||||||
|
where old_orders_id is not null
|
||||||
|
and status != 4
|
||||||
|
)
|
||||||
|
and o1.status in (3,5)
|
||||||
|
) aa inner join tb_user bb on aa.user_id = bb.user_id
|
||||||
|
group by aa.user_id, bb.bl_qds_code
|
||||||
|
) t1 on t1.bl_qds_code = bqc.code
|
||||||
|
left join (
|
||||||
|
select sum(ifnull(qds_code_money,0)) money,user_id
|
||||||
|
from orders
|
||||||
|
where status in (3,5,15)
|
||||||
|
group by user_id
|
||||||
|
) t3 on t3.user_id = x.user_id
|
||||||
|
where x.status= 1
|
||||||
|
<if test="params.qdmName!=null and params.qdmName!=''">
|
||||||
|
and bqc.name like concat('%',#{params.qdmName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.qdsCode!=null and params.qdsCode!=''">
|
||||||
|
and bqc.code like concat('%',#{params.qdsCode},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.qdsName!=null and params.qdsName!=''">
|
||||||
|
and x.name like concat('%',#{params.qdsName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.lm!=null and params.lm!=''">
|
||||||
|
and bqc.lm = #{params.lm}
|
||||||
|
</if>
|
||||||
|
order by x.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="invitationUserPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsData">
|
||||||
|
select b.user_id,b.avatar,b.user_name as name,b.phone
|
||||||
|
from tb_user b
|
||||||
|
where b.bl_qds_code = #{params.qdsCode}
|
||||||
|
and ifnull(b.bl_is_qds,0) = 0
|
||||||
|
<if test="params.name!=null and params.name!=''">
|
||||||
|
and b.user_name like concat('%',#{params.name},'%')
|
||||||
|
</if>
|
||||||
|
<if test="params.phone!=null and params.phone!=''">
|
||||||
|
and b.phone like concat('%',#{params.phone},'%')
|
||||||
|
</if>
|
||||||
|
order by b.user_id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?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.sqx.modules.bl.commission.qds.dao.QdsLmDao">
|
||||||
|
|
||||||
|
<select id="findPage" resultType="com.sqx.modules.bl.commission.qds.entity.QdsLm">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
create_time
|
||||||
|
from bl_qds_lm x
|
||||||
|
<where>
|
||||||
|
<if test="params.name!=null and params.name!=''">
|
||||||
|
and x.name like concat('%',#{params.name},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by x.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="findList" resultType="com.sqx.modules.bl.commission.qds.entity.QdsLm">
|
||||||
|
select
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
create_time
|
||||||
|
from bl_qds_lm x
|
||||||
|
<where>
|
||||||
|
<if test="name!=null and ame!=''">
|
||||||
|
and x.name like concat('%',#{name},'%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by x.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue