bug修复:分销员-我的渠道商查询的字段不对

This commit is contained in:
1378012178@qq.com 2025-02-14 16:55:48 +08:00
parent ec2488a0f2
commit fd8796c658
8 changed files with 37 additions and 7 deletions

View File

@ -1,6 +1,8 @@
package com.sqx.modules.bl.commission.fxy.controller.app;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.bl.commission.fxy.entity.FxyApply;
@ -10,12 +12,18 @@ import com.sqx.modules.bl.commission.fxy.service.FxyApplyService;
import com.sqx.modules.bl.commission.fxy.service.FxyConfigService;
import com.sqx.modules.bl.commission.fxy.service.FxyDataService;
import com.sqx.modules.bl.commission.jjr.entity.JjrApply;
import com.sqx.modules.bl.commission.jjr.entity.JjrData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
@RestController
@RequestMapping("/app/commission/fxy")
@Api(value = "分佣管理", tags = {"分销员管理app"})
@ -43,6 +51,16 @@ public class AppFxyController {
return Result.success();
}
@GetMapping("/upFxyStatus")
@ApiOperation("申请分销员")
public Result upFxyStatus(FxyApply fxyApply){
fxyApply.setStatus(1);
fxyApply.setOpinion("自动通过");
fxyApply.setApproveTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
service.updateByUserId(fxyApply);
return Result.success("申请成功,请重新登录");
}
/**
* 可提现累计佣金已提现未入账今日成交订单累计成交订单今日邀请粉丝累计邀请粉丝
*/

View File

@ -16,4 +16,6 @@ public interface FxyApplyDao extends BaseMapper<FxyApply> {
int approve(FxyApply fxyApply);
IPage<FxyApply> findSuperiorFxyPage(Page<FxyApply> page, @Param("params") FxyApply fxyApply);
int setSuperiorFxy(FxyApply fxyApply);
int updateByUserId(@Param("params") FxyApply fxyApply);
}

View File

@ -12,4 +12,6 @@ public interface FxyApplyService extends IService<FxyApply> {
int approve(FxyApply fxyApply);
Result findSuperiorFxyPage(FxyApply fxyApply);
int setSuperiorFxy(FxyApply fxyApply);
int updateByUserId(FxyApply fxyApply);
}

View File

@ -78,4 +78,9 @@ public class FxyApplyServiceImpl extends ServiceImpl<FxyApplyDao, FxyApply> impl
public int setSuperiorFxy(FxyApply fxyApply){
return baseMapper.setSuperiorFxy(fxyApply);
}
@Override
public int updateByUserId(FxyApply fxyApply) {
return baseMapper.updateByUserId(fxyApply);
}
}

View File

@ -19,6 +19,5 @@ public interface YwyApplyService extends IService<YwyApply> {
int deleteQds(YwyApply ywyApply);
int addQds(YwyApply ywyApply);
YwyApply selectByUserId(Long userId);
Result queryQds(YwyApply ywyApply);
}

View File

@ -108,7 +108,6 @@ public class YwyApplyServiceImpl extends ServiceImpl<YwyApplyDao, YwyApply> impl
QueryWrapper<YwyApply> queryWrapper = new QueryWrapper<>();
return baseMapper.selectOne(queryWrapper.eq("user_id",userId));
}
public Result queryQds(YwyApply ywyApply){
UserEntity userEntity = userService.queryByUserId(ywyApply.getUserId());
ywyApply.setInvitationCode(userEntity.getInvitationCode());

View File

@ -85,5 +85,10 @@
set bl_fxy_code = #{invitationCode}
where user_id=#{userId}
</update>
<update id="updateByUserId">
update bl_fxy_apply
set status = #{params.status},opinion = #{params.opinion},approve_time = #{params.approveTime}
where user_id=#{params.userId}
</update>
</mapper>

View File

@ -149,7 +149,7 @@
from bl_qds_apply qds
left join tb_user tu on qds.user_id = tu.user_id
left join bl_qds_code bqc on tu.user_id = bqc.user_id
where qds.user_id in (select user_id from tb_user where bl_ywy_code = #{params.invitationCode})
where qds.user_id in (select user_id from tb_user where bl_fxy_code = #{params.invitationCode})
order by qds.create_time desc, bqc.rate desc
</select>