Compare commits

..

No commits in common. "b539f77b70f101c12b5fff7ba7a63d42a58b97f3" and "0cbbd803b49974bd3162b7b358e39086c927cf22" have entirely different histories.

6 changed files with 8 additions and 50 deletions

View File

@ -550,11 +550,7 @@ public class UserController {
@PostMapping("/giveUserVip")
@ApiOperation("赠送用户会员")
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;
public Result giveUserVip(Long userId,Integer day){
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//查看用户是否是会员
UserVip userVip = userVipDao.selectOne(new QueryWrapper<UserVip>().eq("user_id", userId));
@ -572,7 +568,7 @@ public class UserController {
}else{
userVip=new UserVip();
//设置会员类型
userVip.setVipNameType(type);
userVip.setVipNameType(1);
//设置开通会员的用户id
userVip.setUserId(userId);
//设置会员的购买时间
@ -677,4 +673,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));
}
}
}

View File

@ -1,6 +1,5 @@
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;
@ -26,15 +25,6 @@ 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){

View File

@ -4,10 +4,8 @@ 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;
@ -17,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
@RestController
@ -26,10 +23,6 @@ public class BlShipinquanPinglunController {
@Autowired
private BlShipinquanPinglunService service;
@Autowired
private BlShipinquanPinglunService pinglunservice;
@Autowired
private BlShipinquanService spqService;
@GetMapping("/list")
@ -61,15 +54,6 @@ 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();
}

View File

@ -40,9 +40,6 @@ public class BlShipinquan implements Serializable {
*/
private Long approveUser;
//置顶排序 0为不置顶
private Integer topSort;
@TableField(exist = false)
private String artificerImg;
@ -74,6 +71,4 @@ public class BlShipinquan implements Serializable {
@TableField(exist = false)
private Integer onLine;//在线状态
@TableField(exist = false)
private Integer isTop;
}

View File

@ -31,7 +31,6 @@
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,
@ -49,21 +48,15 @@
<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 a.top_sort desc, (st_distance (point (b.longitude, b.latitude),point(#{params.longitude},#{params.longitude}) ) *111195) asc,a.create_time desc
order by (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.top_sort desc,a.create_time desc
order by a.create_time desc
</if>
</select>
@ -76,4 +69,4 @@
where id=#{id}
</update>
</mapper>
</mapper>

View File

@ -12,7 +12,7 @@
a.create_time,
a.content,
a.shipinquan_id,
IFNULL(b.user_name, '匿名') AS user_name,
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>