项目详情增加加钟项目列表
This commit is contained in:
parent
f7cdf0bfa9
commit
168e0f30df
|
@ -96,12 +96,12 @@ public class ArtificerController {
|
|||
|
||||
@GetMapping("/selectMassageTypePage")
|
||||
@ApiOperation("查询按摩分类(分页)")
|
||||
public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
return massageTypeService.selectMassageTypePage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId);
|
||||
}
|
||||
@GetMapping("/selectMassageTypeChildrenPage")
|
||||
@ApiOperation("查询按摩分类子项目(分页)")
|
||||
public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
return massageTypeService.selectMassageTypeChildrenPage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId);
|
||||
}
|
||||
@GetMapping("/selectMassageTypeList")
|
||||
|
|
|
@ -95,17 +95,17 @@ public class AppArtificerController {
|
|||
|
||||
@GetMapping("/selectMassageTypePage")
|
||||
@ApiOperation("查询按摩分类(分页)")
|
||||
public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
return massageTypeService.selectMassageTypePage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId);
|
||||
}
|
||||
@GetMapping("/selectMassageTypeChildrenPage")
|
||||
@ApiOperation("查询按摩分类子项目(分页)")
|
||||
public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
return massageTypeService.selectMassageTypeChildrenPage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId);
|
||||
}
|
||||
@GetMapping("/selectMassageTypeList")
|
||||
@ApiOperation("查询按摩分类(不带分页)")
|
||||
public Result selectMassageTypeList(Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypeList(Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
return massageTypeService.selectMassageTypeList(status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId);
|
||||
}
|
||||
|
||||
|
@ -121,12 +121,7 @@ public class AppArtificerController {
|
|||
collectMassage.setFlag(1);
|
||||
collectMassageService.insertCollect(collectMassage);
|
||||
}
|
||||
MassageType massageType = massageTypeService.getById(massageTypeId);
|
||||
SysDictEntity sysDictEntity = sysDictService.getById(massageType.getClassifyId());
|
||||
if(sysDictEntity!=null){
|
||||
massageType.setClassifyName(sysDictEntity.getCode());
|
||||
}
|
||||
return Result.success().put("data",massageType);
|
||||
return massageTypeService.selectMassageTypeById(massageTypeId,userId);
|
||||
}
|
||||
|
||||
@GetMapping("/selectArtificerList")
|
||||
|
|
|
@ -17,9 +17,9 @@ public interface MassageTypeDao extends BaseMapper<MassageType> {
|
|||
|
||||
List<MassageType> selectArtificerMassageList(@Param("artificerId") Long artificerId,@Param("status") Integer status);
|
||||
|
||||
IPage<MassageType> selectMassageTypePage(Page<MassageType> page,@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Integer parentId,@Param("classifyId") Long classifyId);
|
||||
IPage<MassageType> selectMassageTypePage(Page<MassageType> page,@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Long parentId,@Param("classifyId") Long classifyId);
|
||||
|
||||
List<MassageType> selectMassageTypeList(@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Integer parentId,@Param("classifyId") Long classifyId);
|
||||
List<MassageType> selectMassageTypeList(@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Long parentId,@Param("classifyId") Long classifyId);
|
||||
|
||||
IPage<?> selectMassageTypeChildrenPage(Page<MassageType> pages, Integer status, String city, Integer sort, Integer authentication, Integer by, String title, Long artificerId, Integer parentId, Long classifyId);
|
||||
IPage<MassageType> selectMassageTypeChildrenPage(Page<MassageType> pages, Integer status, String city, Integer sort, Integer authentication, Integer by, String title, Long artificerId, Long parentId, Long classifyId);
|
||||
}
|
|
@ -7,6 +7,7 @@ import lombok.Data;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description massage_type
|
||||
|
@ -134,6 +135,8 @@ public class MassageType implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private Integer artificerMassageStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<MassageType> childrenMassageList;
|
||||
|
||||
public MassageType() {}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,11 @@ public interface MassageTypeService extends IService<MassageType> {
|
|||
|
||||
Result selectArtificerMassageList(Long artificerId,Integer status);
|
||||
|
||||
Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId);
|
||||
Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId);
|
||||
|
||||
Result selectMassageTypeList(Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId);
|
||||
Result selectMassageTypeList(Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId);
|
||||
|
||||
Result selectMassageTypeChildrenPage(Integer page, Integer limit, Integer status, String city, Integer sort, Integer authentication, Integer by, String title, Long artificerId, Long userId, Long parentId, Long classifyId);
|
||||
|
||||
Result selectMassageTypeChildrenPage(Integer page, Integer limit, Integer status, String city, Integer sort, Integer authentication, Integer by, String title, Long artificerId, Long userId, Integer parentId, Long classifyId);
|
||||
Result selectMassageTypeById(Long massageTypeId,Long userId);
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.sqx.modules.artificer.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sqx.common.utils.PageUtils;
|
||||
|
@ -11,6 +12,8 @@ import com.sqx.modules.artificer.entity.MassageType;
|
|||
import com.sqx.modules.artificer.service.ArtificerService;
|
||||
import com.sqx.modules.artificer.service.MassageTypeService;
|
||||
import com.sqx.modules.search.service.AppSearchService;
|
||||
import com.sqx.modules.sys.entity.SysDictEntity;
|
||||
import com.sqx.modules.sys.service.SysDictService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -23,6 +26,8 @@ public class MassageTypeServiceImpl extends ServiceImpl<MassageTypeDao, MassageT
|
|||
|
||||
@Autowired
|
||||
private AppSearchService appSearchService;
|
||||
@Autowired
|
||||
SysDictService sysDictService;
|
||||
|
||||
@Override
|
||||
public Result selectArtificerMassageList(Long artificerId,Integer status){
|
||||
|
@ -31,7 +36,7 @@ public class MassageTypeServiceImpl extends ServiceImpl<MassageTypeDao, MassageT
|
|||
}
|
||||
|
||||
@Override
|
||||
public Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
if(StringUtils.isNotEmpty(title) && userId!=null){
|
||||
appSearchService.insetAppSearch(title, userId);
|
||||
}
|
||||
|
@ -39,7 +44,7 @@ public class MassageTypeServiceImpl extends ServiceImpl<MassageTypeDao, MassageT
|
|||
return Result.success().put("data",new PageUtils(baseMapper.selectMassageTypePage(pages,status,city,sort,authentication,by,title,artificerId,parentId,classifyId)));
|
||||
}
|
||||
@Override
|
||||
public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
if(StringUtils.isNotEmpty(title) && userId!=null){
|
||||
appSearchService.insetAppSearch(title, userId);
|
||||
}
|
||||
|
@ -48,11 +53,23 @@ public class MassageTypeServiceImpl extends ServiceImpl<MassageTypeDao, MassageT
|
|||
}
|
||||
|
||||
@Override
|
||||
public Result selectMassageTypeList(Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Integer parentId,Long classifyId){
|
||||
public Result selectMassageTypeList(Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){
|
||||
if(StringUtils.isNotEmpty(title) && userId!=null){
|
||||
appSearchService.insetAppSearch(title, userId);
|
||||
}
|
||||
return Result.success().put("data",baseMapper.selectMassageTypeList(status,city,sort,authentication,by,title,artificerId,parentId,classifyId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result selectMassageTypeById(Long massageTypeId,Long userId){
|
||||
MassageType massageType = this.getById(massageTypeId);
|
||||
SysDictEntity sysDictEntity = sysDictService.getById(massageType.getClassifyId());
|
||||
if(sysDictEntity!=null){
|
||||
massageType.setClassifyName(sysDictEntity.getCode());
|
||||
}
|
||||
List<MassageType> children = baseMapper.selectMassageTypeList(1,null,null,null,3,null,null,massageTypeId,null);
|
||||
massageType.setChildrenMassageList(children);
|
||||
return Result.success().put("data",massageType);
|
||||
}
|
||||
|
||||
}
|
|
@ -3373,6 +3373,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
data.put("time14", new TemplateMessageItem(DateUtils.format(new Date()), "#d71345"));
|
||||
userService.sendWxMessage(apkey, data, userEntity.getWxOpenId());
|
||||
}
|
||||
artificerTimeService.remove(new QueryWrapper<ArtificerTime>().eq("orders_id", orders.getOrdersId()));
|
||||
}
|
||||
if(isAuto == 1){
|
||||
//扣车费
|
||||
|
@ -3905,14 +3906,14 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
BigDecimal payMoney = orders.getPayMoney().subtract(orders.getTaxiMoney());
|
||||
orders.setPayMoney(payMoney);
|
||||
}
|
||||
//删除技师占用时间表数据
|
||||
artificerTimeService.remove(new QueryWrapper<ArtificerTime>().eq("orders_id", orders.getOrdersId()));
|
||||
if(orders.getOldOrdersId()!=null && orders.getOldOrdersId() !=0){
|
||||
//此笔单子退车费,并改为取消,再将原单改成待补单
|
||||
orders.setRefusalContent("");
|
||||
orders.setTaxiMoney(BigDecimal.ZERO);
|
||||
orders.setStatus(4);
|
||||
baseMapper.updateById(orders);
|
||||
//删除技师占用时间表数据
|
||||
artificerTimeService.remove(new QueryWrapper<ArtificerTime>().eq("orders_id", orders.getOrdersId()));
|
||||
cancelSupplementOrders(userId, orders.getOldOrdersId(), isAuto, 1);//退原单,原单的车费已被退/扣,所以只退项目
|
||||
}else{
|
||||
BigDecimal taxiMoney = orders.getTaxiMoney();
|
||||
|
@ -3923,8 +3924,6 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
orders.setArtificerMoney(artificerMoney);
|
||||
orders.setSumArtificerMoney(artificerMoney);
|
||||
baseMapper.updateById(orders);
|
||||
//删除技师占用时间表数据
|
||||
artificerTimeService.remove(new QueryWrapper<ArtificerTime>().eq("orders_id", orders.getOrdersId()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -103,44 +103,46 @@
|
|||
|
||||
|
||||
<select id="selectMassageTypeList" resultType="com.sqx.modules.artificer.entity.MassageType">
|
||||
select * from massage_type
|
||||
where status=1
|
||||
select m.*,s.code as classifyName
|
||||
from massage_type m
|
||||
left join sys_dict s on s.id=m.classify_id
|
||||
where m.status=1
|
||||
<if test="artificerId!=null">
|
||||
and massage_type_id not in (select massage_type_id from artificer_massage where artificer_id=#{artificerId})
|
||||
and m.massage_type_id not in (select massage_type_id from artificer_massage where artificer_id=#{artificerId})
|
||||
</if>
|
||||
<if test="status!=null and status!=0">
|
||||
and status=#{status}
|
||||
and m.status=#{status}
|
||||
</if>
|
||||
<if test="parentId==null or parentId==0">
|
||||
and (parent_id is null or parent_id=0)
|
||||
and (m.parent_id is null or m.parent_id=0)
|
||||
</if>
|
||||
<if test="parentId!=null and parentId!=0">
|
||||
and parent_id=#{parentId}
|
||||
and m.parent_id=#{parentId}
|
||||
</if>
|
||||
<if test="classifyId!=null and classifyId!=0">
|
||||
and classify_id=#{classifyId}
|
||||
and m.classify_id=#{classifyId}
|
||||
</if>
|
||||
<if test="city!=null and city!=''">
|
||||
and (city like concat('%',#{city},'%') or city='不限')
|
||||
and (m.city like concat('%',#{city},'%') or m.city='不限')
|
||||
</if>
|
||||
<if test="title!=null and title!=''">
|
||||
and title like concat('%',#{title},'%')
|
||||
and m.title like concat('%',#{title},'%')
|
||||
</if>
|
||||
order by
|
||||
<if test="authentication!=null and authentication==1">
|
||||
price desc
|
||||
m.price desc
|
||||
</if>
|
||||
<if test="authentication!=null and authentication==2">
|
||||
price asc
|
||||
m.price asc
|
||||
</if>
|
||||
<if test="by!=null and by==1">
|
||||
sales desc
|
||||
m.sales desc
|
||||
</if>
|
||||
<if test="by!=null and by==2">
|
||||
sales asc
|
||||
m.sales asc
|
||||
</if>
|
||||
<if test="(by==null and authentication==null) or (by==0 and authentication==0)">
|
||||
create_time desc
|
||||
m.create_time desc
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue