1、调整设置会员接口:根据配置的会员类型进行保存,前逻辑为固定存储为季度会员类型
2、视频圈:1)增加未审批数量查询接口2)增加置顶功能字段3)调整视频圈评论查询sql,如果未存储评论人,默认返回名字为'匿名'
This commit is contained in:
parent
236e72bd19
commit
2f07105a26
|
@ -550,7 +550,11 @@ public class UserController {
|
|||
|
||||
@PostMapping("/giveUserVip")
|
||||
@ApiOperation("赠送用户会员")
|
||||
public Result giveUserVip(Long userId,Integer day){
|
||||
public Result giveUserVip(Long userId,Integer type){
|
||||
Integer day = 0;
|
||||
if(type == 0) day = 30;
|
||||
if(type == 1) day = 90;
|
||||
if(type == 2) day = 360;
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
//查看用户是否是会员
|
||||
UserVip userVip = userVipDao.selectOne(new QueryWrapper<UserVip>().eq("user_id", userId));
|
||||
|
@ -568,7 +572,7 @@ public class UserController {
|
|||
}else{
|
||||
userVip=new UserVip();
|
||||
//设置会员类型
|
||||
userVip.setVipNameType(1);
|
||||
userVip.setVipNameType(type);
|
||||
//设置开通会员的用户id
|
||||
userVip.setUserId(userId);
|
||||
//设置会员的购买时间
|
||||
|
@ -673,4 +677,4 @@ public class UserController {
|
|||
public Result integralPc(String type,Integer current,Integer size,String date,String artificerId) throws ParseException {
|
||||
return Result.success(userService.integralPc(type,current,size,date,artificerId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.sqx.modules.shipinquan.content;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.shipinquan.entity.BlShipinquan;
|
||||
import com.sqx.modules.shipinquan.service.BlShipinquanService;
|
||||
|
@ -25,6 +26,15 @@ public class BlShipinquanController {
|
|||
return service.findPage(page,limit,entity);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/dataSelectSpq")
|
||||
@ApiOperation("获取数据未审批数据")
|
||||
public Result dataSelectSpq(){
|
||||
QueryWrapper<BlShipinquan> qw = new QueryWrapper<>();
|
||||
qw.eq("status",0);
|
||||
return Result.success().put("data",service.count(qw));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public Result add(BlShipinquan BlShipinquan){
|
||||
|
|
|
@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.shipinquan.entity.BlShipinquan;
|
||||
import com.sqx.modules.shipinquan.entity.BlShipinquanPinglun;
|
||||
import com.sqx.modules.shipinquan.service.BlShipinquanPinglunService;
|
||||
import com.sqx.modules.shipinquan.service.BlShipinquanService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@RestController
|
||||
|
@ -23,6 +26,10 @@ public class BlShipinquanPinglunController {
|
|||
|
||||
@Autowired
|
||||
private BlShipinquanPinglunService service;
|
||||
@Autowired
|
||||
private BlShipinquanPinglunService pinglunservice;
|
||||
@Autowired
|
||||
private BlShipinquanService spqService;
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
|
@ -54,6 +61,15 @@ public class BlShipinquanPinglunController {
|
|||
@ApiOperation("删除")
|
||||
public Result delete(BlShipinquanPinglun BlShipinquanPinglun){
|
||||
service.removeById(BlShipinquanPinglun.getId());
|
||||
|
||||
QueryWrapper<BlShipinquanPinglun> query = new QueryWrapper<BlShipinquanPinglun>();
|
||||
query.eq("shipinquan_id", BlShipinquanPinglun.getShipinquanId());
|
||||
List<BlShipinquanPinglun> list = pinglunservice.list(query);
|
||||
|
||||
BlShipinquan blShipinquan = spqService.getById(BlShipinquanPinglun.getShipinquanId());
|
||||
blShipinquan.setPls(list.size());
|
||||
spqService.updateById(blShipinquan);
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,9 @@ public class BlShipinquan implements Serializable {
|
|||
*/
|
||||
private Long approveUser;
|
||||
|
||||
//置顶排序 0为不置顶
|
||||
private Integer topSort;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String artificerImg;
|
||||
|
||||
|
@ -71,4 +74,6 @@ public class BlShipinquan implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private Integer onLine;//在线状态
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer isTop;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
a.pic_path,
|
||||
a.status,
|
||||
a.opinion,
|
||||
a.top_sort topSort,
|
||||
b.status as onLine,
|
||||
b.artificer_id as create_by,
|
||||
b.artificer_name as artificer_name,
|
||||
|
@ -48,15 +49,21 @@
|
|||
<if test="params.status!=null and params.status!=''">
|
||||
and a.status = #{params.status}
|
||||
</if>
|
||||
<if test="params.isTop!=null and params.isTop == 0">
|
||||
and a.top_sort = 0
|
||||
</if>
|
||||
<if test="params.isTop!=null and params.isTop == 1">
|
||||
and a.top_sort > 0
|
||||
</if>
|
||||
<if test="params.artificerName!=null and params.artificerName!=''">
|
||||
and b.artificer_name like concat('%',#{params.artificerName},'%')
|
||||
</if>
|
||||
</where>
|
||||
<if test="params.longitude!=null and params.longitude!='' and params.latitude!=null and params.latitude!=''">
|
||||
order by (st_distance (point (b.longitude, b.latitude),point(#{params.longitude},#{params.longitude}) ) *111195) asc,a.create_time desc
|
||||
order by a.top_sort desc, (st_distance (point (b.longitude, b.latitude),point(#{params.longitude},#{params.longitude}) ) *111195) asc,a.create_time desc
|
||||
</if>
|
||||
<if test="params.longitude==null or params.longitude=='' or params.latitude==null or params.latitude==''">
|
||||
order by a.create_time desc
|
||||
order by a.top_sort desc,a.create_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -69,4 +76,4 @@
|
|||
where id=#{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
a.create_time,
|
||||
a.content,
|
||||
a.shipinquan_id,
|
||||
b.user_name as user_name,
|
||||
IFNULL(b.user_name, '匿名') AS user_name,
|
||||
b.avatar as user_photo
|
||||
from bl_shipinquan_pinglun a
|
||||
LEFT JOIN tb_user b on a.create_by = b.user_id
|
||||
|
@ -25,4 +25,4 @@
|
|||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue