bug修复:分销员-我的渠道商查询的字段不对
This commit is contained in:
parent
ec2488a0f2
commit
fd8796c658
|
@ -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("申请成功,请重新登录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 可提现、累计佣金、已提现、未入账、今日成交订单、累计成交订单、今日邀请粉丝、累计邀请粉丝
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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>
|
||||
</mapper>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue