认证类型
This commit is contained in:
parent
25902ecc99
commit
8b558ea62b
|
@ -16,8 +16,10 @@ import com.sqx.modules.app.service.UserMoneyDetailsService;
|
|||
import com.sqx.modules.app.service.UserMoneyService;
|
||||
import com.sqx.modules.app.service.UserService;
|
||||
import com.sqx.modules.artificer.dao.OrdersDao;
|
||||
import com.sqx.modules.artificer.entity.Agency;
|
||||
import com.sqx.modules.artificer.entity.Artificer;
|
||||
import com.sqx.modules.artificer.entity.Certification;
|
||||
import com.sqx.modules.artificer.service.AgencyService;
|
||||
import com.sqx.modules.artificer.service.ArtificerService;
|
||||
import com.sqx.modules.artificer.service.RealNameService;
|
||||
import com.sqx.modules.bl.commission.jjr.entity.JjrData;
|
||||
|
@ -79,6 +81,8 @@ public class UserController {
|
|||
private CommonInfoService commonInfoService;
|
||||
@Autowired
|
||||
private JjrDataService jjrDataService;
|
||||
@Autowired
|
||||
private AgencyService agencyService;
|
||||
|
||||
@GetMapping("/queryByInvitationCode")
|
||||
@ApiOperation("通过邀请码查询用户")
|
||||
|
@ -493,15 +497,18 @@ public class UserController {
|
|||
artificer.setLifePhoto(certification.getImagePhoto());
|
||||
artificer.setCertificate(certification.getCertification());
|
||||
artificer.setContent(certification.getIndividualResume());
|
||||
//需要修改1111111111111
|
||||
// artificer.setClassifyId(certification.getClassifyId());
|
||||
artificer.setClassifyId(certification.getClassifyId());
|
||||
Agency agency = agencyService.selectAgencyByUserId(certification.getUserId());
|
||||
if(agency!=null){
|
||||
artificer.setCity(agency.getCity());
|
||||
}else{
|
||||
artificer.setCity("长春市");
|
||||
}
|
||||
if(artificer.getArtificerId()!=null){
|
||||
artificerService.updateById(artificer);
|
||||
}else{
|
||||
artificerService.save(artificer);
|
||||
}
|
||||
|
||||
|
||||
BigDecimal cashDeposit = certification.getMoney();
|
||||
Long userId = user.getUserId();
|
||||
userMoneyDao.updateCashDeposit(1, userId, cashDeposit.doubleValue());
|
||||
|
@ -519,7 +526,6 @@ public class UserController {
|
|||
}
|
||||
artificerService.removeById(artificer.getArtificerId());
|
||||
}
|
||||
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
|
|
@ -57,8 +57,9 @@ public class RealNameController {
|
|||
@PostMapping("/updateRealName")
|
||||
@ApiOperation("修改技师实名认证")
|
||||
public Result updateRealName(@RequestBody Certification certification){
|
||||
realNameService.updateById(certification);
|
||||
return Result.success();
|
||||
return realNameService.modifyRealName(certification);
|
||||
// realNameService.updateById(certification);
|
||||
// return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperation("按id查看实名认证信息")
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.joda.time.DateTime;
|
|||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description artificer
|
||||
|
@ -99,7 +100,7 @@ public class Artificer implements Serializable {
|
|||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private Long classifyId;
|
||||
private String classifyId;
|
||||
|
||||
/**
|
||||
* 出行方式 1公交 2出租 3免费
|
||||
|
@ -243,5 +244,8 @@ public class Artificer implements Serializable {
|
|||
*/
|
||||
private String grade;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ArtificerClassify> artificerClassifyList;
|
||||
|
||||
public Artificer() {}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ public class ArtificerClassify implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
|
|
|
@ -10,6 +10,8 @@ public interface RealNameService extends IService<Certification> {
|
|||
|
||||
Result updateRealName(Certification certification);
|
||||
|
||||
Result modifyRealName(Certification certification);
|
||||
|
||||
Result selectRealNameList(Integer page, Integer limit, Integer status, String userName, String phone,String classifyId);
|
||||
|
||||
Result auditRealName(Certification certification);
|
||||
|
|
|
@ -29,6 +29,8 @@ import com.sqx.modules.file.utils.FileUploadUtils;
|
|||
import com.sqx.modules.message.entity.MessageInfo;
|
||||
import com.sqx.modules.message.service.MessageService;
|
||||
import com.sqx.modules.pay.dao.CashOutDao;
|
||||
import com.sqx.modules.sys.entity.SysDictEntity;
|
||||
import com.sqx.modules.sys.service.SysDictService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -67,10 +69,11 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
@Autowired
|
||||
private UserRechargeDao userRechargeDao;
|
||||
@Autowired
|
||||
private CommonInfoDao commonInfoDao;
|
||||
|
||||
private CommonInfoDao commonInfoDao;
|
||||
@Autowired
|
||||
private FaceMain faceMain;
|
||||
@Autowired
|
||||
private SysDictService sysDictService;
|
||||
|
||||
@Override
|
||||
public Result selectArtificerList(Integer page, Integer limit, Long massageTypeId,String artificerName,
|
||||
|
@ -88,8 +91,6 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
city = "长春市";
|
||||
}
|
||||
|
||||
|
||||
|
||||
IPage<Artificer> artificerIPage = baseMapper.selectArtificerList(pages, massageTypeId, artificerName,
|
||||
longitude, latitude, sort, authentication, by, status, city, classifyId,phone,user,isStart,technicianType,isBack);
|
||||
List<Artificer> records = artificerIPage.getRecords();
|
||||
|
@ -171,8 +172,8 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
if(oldDate.equals(date)){
|
||||
artificer.setTime(stringBuilder.toString());
|
||||
}else{
|
||||
// artificer.setTime(md.format(calendar.getTime())+" "+stringBuilder.toString());
|
||||
artificer.setTime(simpleDateFormat.format(calendar.getTime())+" "+stringBuilder.toString());
|
||||
artificer.setTime(md.format(calendar.getTime())+" "+stringBuilder.toString());
|
||||
// artificer.setTime(simpleDateFormat.format(calendar.getTime())+" "+stringBuilder.toString());
|
||||
}
|
||||
if(artificer.getStatus()!=null && artificer.getStatus()==2){
|
||||
artificer.setState(3);
|
||||
|
@ -203,11 +204,29 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
//2.服务开始前及结束后预留出行时间
|
||||
//精油往后延30 分钟,中医往后延60 分钟
|
||||
// if(artificer.getClassifyId()==95){
|
||||
String time = artificer.getTime();
|
||||
// String time = artificer.getTime();
|
||||
//在精油的基础上加30 分钟就是中医~~
|
||||
DateTime dateTime1 = DateUtil.offsetMinute(DateUtil.parse(time), 30);
|
||||
artificer.setTime(DateUtil.format(dateTime1,"HH:mm"));
|
||||
// DateTime dateTime1 = DateUtil.offsetMinute(DateUtil.parse(time), 30);
|
||||
// artificer.setTime(DateUtil.format(dateTime1,"HH:mm"));
|
||||
// }
|
||||
|
||||
String classifyIds = artificer.getClassifyId();
|
||||
String[] classifyArr = classifyIds.split(",");
|
||||
if(classifyArr.length>0){
|
||||
List<ArtificerClassify> artificerClassifyList = new ArrayList<ArtificerClassify>();
|
||||
for(int i=0;i<classifyArr.length;i++){
|
||||
String classifyIdStr = classifyArr[i];
|
||||
Long cid = Long.valueOf(classifyIdStr);
|
||||
SysDictEntity sysDictEntity = sysDictService.getById(cid);
|
||||
if(sysDictEntity!=null){
|
||||
ArtificerClassify artificerClassify = new ArtificerClassify();
|
||||
artificerClassify.setClassifyId(cid);
|
||||
artificerClassify.setClassifyName(sysDictEntity.getValue());
|
||||
artificerClassifyList.add(artificerClassify);
|
||||
}
|
||||
}
|
||||
artificer.setArtificerClassifyList(artificerClassifyList);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
|
@ -275,10 +294,27 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
times=time+":30";
|
||||
}
|
||||
}
|
||||
|
||||
String classifyIds = artificer.getClassifyId();
|
||||
String[] classifyArr = classifyIds.split(",");
|
||||
if(classifyArr.length>0){
|
||||
List<ArtificerClassify> artificerClassifyList = new ArrayList<ArtificerClassify>();
|
||||
for(int i=0;i<classifyArr.length;i++){
|
||||
String classifyIdStr = classifyArr[i];
|
||||
Long cid = Long.valueOf(classifyIdStr);
|
||||
SysDictEntity sysDictEntity = sysDictService.getById(cid);
|
||||
if(sysDictEntity!=null){
|
||||
ArtificerClassify artificerClassify = new ArtificerClassify();
|
||||
artificerClassify.setClassifyId(cid);
|
||||
artificerClassify.setClassifyName(sysDictEntity.getValue());
|
||||
artificerClassifyList.add(artificerClassify);
|
||||
}
|
||||
}
|
||||
artificer.setArtificerClassifyList(artificerClassifyList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Result.success().put("data",new PageUtils(artificerIPage));
|
||||
}
|
||||
|
||||
|
@ -293,6 +329,24 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
}
|
||||
Artificer artificer = baseMapper.selectArtificerById(userId,artificerId,longitude,latitude);
|
||||
|
||||
String classifyIds = artificer.getClassifyId();
|
||||
String[] classifyArr = classifyIds.split(",");
|
||||
if(classifyArr.length>0){
|
||||
List<ArtificerClassify> artificerClassifyList = new ArrayList<ArtificerClassify>();
|
||||
for(int i=0;i<classifyArr.length;i++){
|
||||
String classifyIdStr = classifyArr[i];
|
||||
Long cid = Long.valueOf(classifyIdStr);
|
||||
SysDictEntity sysDictEntity = sysDictService.getById(cid);
|
||||
if(sysDictEntity!=null){
|
||||
ArtificerClassify artificerClassify = new ArtificerClassify();
|
||||
artificerClassify.setClassifyId(cid);
|
||||
artificerClassify.setClassifyName(sysDictEntity.getValue());
|
||||
artificerClassifyList.add(artificerClassify);
|
||||
}
|
||||
}
|
||||
artificer.setArtificerClassifyList(artificerClassifyList);
|
||||
}
|
||||
|
||||
String value = commonInfoService.findOne(392).getValue();
|
||||
if("30".equals(value)){
|
||||
SimpleDateFormat sdfHour=new SimpleDateFormat("HH");
|
||||
|
@ -400,12 +454,12 @@ public class ArtificerServiceImpl extends ServiceImpl<ArtificerDao, Artificer> i
|
|||
}
|
||||
//2.服务开始前及结束后预留出行时间
|
||||
//精油往后延30 分钟,中医往后延60 分钟
|
||||
if(artificer.getClassifyId()==95){
|
||||
String time = artificer.getTime();
|
||||
// if(artificer.getClassifyId()==95){
|
||||
// String time = artificer.getTime();
|
||||
//在精油的基础上加30 分钟就是中医~~
|
||||
DateTime dateTime1 = DateUtil.offsetMinute(DateUtil.parse(time), 30);
|
||||
artificer.setTime(DateUtil.format(dateTime1,"HH:mm"));
|
||||
}
|
||||
// DateTime dateTime1 = DateUtil.offsetMinute(DateUtil.parse(time), 30);
|
||||
// artificer.setTime(DateUtil.format(dateTime1,"HH:mm"));
|
||||
// }
|
||||
}else{
|
||||
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("HH");
|
||||
|
|
|
@ -638,9 +638,9 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
public Result insertOrders(Orders orders) {
|
||||
String msg = "";
|
||||
// reentrantReadWriteLock.writeLock().lock();
|
||||
Artificer artificer1 = artificerDao.selectOne(Wrappers.<Artificer>lambdaQuery()
|
||||
.eq(Artificer::getArtificerId, orders.getArtificerId()));
|
||||
orders.setClassifyId(artificer1.getClassifyId());
|
||||
// Artificer artificer1 = artificerDao.selectOne(Wrappers.<Artificer>lambdaQuery()
|
||||
// .eq(Artificer::getArtificerId, orders.getArtificerId()));
|
||||
// orders.setClassifyId(artificer1.getClassifyId());
|
||||
try {
|
||||
if(orders.getUserPackageDetailId() !=null ){
|
||||
//套餐订单
|
||||
|
@ -743,6 +743,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
return Result.error("该订单已生成,请到订单列表进行支付!");
|
||||
}
|
||||
}
|
||||
orders.setClassifyId(massageType.getClassifyId());
|
||||
|
||||
BigDecimal price = BigDecimal.ZERO;
|
||||
String massageTypeName = "";
|
||||
|
@ -941,6 +942,9 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
return Result.error("该订单已生成,请到订单列表进行支付!");
|
||||
}
|
||||
}
|
||||
|
||||
orders.setClassifyId(userPackageDetail.getClassifyId());
|
||||
|
||||
orders.setUserPackageId(userPackageDetail.getMainId());
|
||||
orders.setUserPackageDetailId(userPackageDetail.getId());
|
||||
if(userPackageDetail.getStatus().equals(1)){
|
||||
|
|
|
@ -10,13 +10,16 @@ import com.sqx.modules.app.dao.UserMoneyDao;
|
|||
import com.sqx.modules.app.entity.UserEntity;
|
||||
import com.sqx.modules.app.entity.UserMoney;
|
||||
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||
import com.sqx.modules.app.entity.VipDetails;
|
||||
import com.sqx.modules.app.service.UserMoneyDetailsService;
|
||||
import com.sqx.modules.app.service.UserService;
|
||||
import com.sqx.modules.artificer.dao.OrdersDao;
|
||||
import com.sqx.modules.artificer.dao.RealNameDao;
|
||||
import com.sqx.modules.artificer.entity.Agency;
|
||||
import com.sqx.modules.artificer.entity.Artificer;
|
||||
import com.sqx.modules.artificer.entity.ArtificerClassify;
|
||||
import com.sqx.modules.artificer.entity.Certification;
|
||||
import com.sqx.modules.artificer.service.AgencyService;
|
||||
import com.sqx.modules.artificer.service.ArtificerClassifyService;
|
||||
import com.sqx.modules.artificer.service.ArtificerService;
|
||||
import com.sqx.modules.artificer.service.RealNameService;
|
||||
|
@ -54,6 +57,8 @@ public class RealNameServiceImpl extends ServiceImpl<RealNameDao, Certification>
|
|||
private SysDictService sysDictService;
|
||||
@Autowired
|
||||
private ArtificerClassifyService artificerClassifyService;
|
||||
@Autowired
|
||||
private AgencyService agencyService;
|
||||
|
||||
private ReentrantReadWriteLock reentrantReadWriteLock=new ReentrantReadWriteLock(true);
|
||||
|
||||
|
@ -118,6 +123,33 @@ public class RealNameServiceImpl extends ServiceImpl<RealNameDao, Certification>
|
|||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result modifyRealName(Certification certification){
|
||||
Certification certification1 = baseMapper.selectById(certification.getId());
|
||||
if(!certification.getClassifyId().equals(certification1.getClassifyId())){
|
||||
artificerClassifyService.remove(new QueryWrapper<ArtificerClassify>().eq("user_id", certification1.getUserId()));
|
||||
String classifyIds = certification.getClassifyId();
|
||||
String[] classifyArr = classifyIds.split(",");
|
||||
if(classifyArr.length>0){
|
||||
for(int i=0;i<classifyArr.length;i++){
|
||||
String classifyIdStr = classifyArr[i];
|
||||
Long classifyId = Long.valueOf(classifyIdStr);
|
||||
ArtificerClassify artificerClassify = new ArtificerClassify();
|
||||
artificerClassify.setUserId(certification1.getUserId());
|
||||
artificerClassify.setClassifyId(classifyId);
|
||||
artificerClassifyService.save(artificerClassify);
|
||||
}
|
||||
}
|
||||
Artificer artificer = artificerService.selectArtificerByUserId(certification1.getUserId());
|
||||
if(artificer!=null){
|
||||
artificer.setClassifyId(certification.getClassifyId());
|
||||
artificerService.updateById(artificer);
|
||||
}
|
||||
}
|
||||
baseMapper.updateById(certification);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result selectRealNameList(Integer page, Integer limit, Integer status, String userName, String phone,String classifyId) {
|
||||
Page<Certification> pages = new Page<>(page, limit);
|
||||
|
@ -156,7 +188,8 @@ public class RealNameServiceImpl extends ServiceImpl<RealNameDao, Certification>
|
|||
public Result auditRealName(Certification certification) {
|
||||
baseMapper.updateById(certification);
|
||||
Certification certification1 = baseMapper.selectById(certification.getId());
|
||||
if(certification.getStatus()==1){
|
||||
if(certification1.getStatus()==1){
|
||||
Agency agency = agencyService.selectAgencyByUserId(certification1.getUserId());
|
||||
Artificer artificer = artificerService.selectArtificerByUserId(certification1.getUserId());
|
||||
if(artificer==null){
|
||||
artificer=new Artificer();
|
||||
|
@ -173,9 +206,14 @@ public class RealNameServiceImpl extends ServiceImpl<RealNameDao, Certification>
|
|||
artificer.setLifePhoto(certification1.getImagePhoto());
|
||||
artificer.setCertificate(certification1.getCertification());
|
||||
artificer.setContent(certification1.getIndividualResume());
|
||||
// artificer.setClassifyId(certification1.getClassifyId());
|
||||
artificer.setClassifyId(certification1.getClassifyId());
|
||||
artificer.setCreditScore(BigDecimal.valueOf(100));
|
||||
artificer.setTripWay(1);
|
||||
if(agency!=null){
|
||||
artificer.setCity(agency.getCity());
|
||||
}else{
|
||||
artificer.setCity("长春市");
|
||||
}
|
||||
if(artificer.getArtificerId()!=null){
|
||||
artificerService.updateById(artificer);
|
||||
}else{
|
||||
|
|
|
@ -121,7 +121,7 @@ public class UserPackageDetail implements Serializable {
|
|||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer classifyId;
|
||||
private Long classifyId;
|
||||
|
||||
/**
|
||||
* 适用人群
|
||||
|
|
|
@ -132,7 +132,7 @@ public class AllTaskServiceImpl implements AllTaskSercice {
|
|||
if(ynJfgz==1){
|
||||
//4.5根据对应的收益,判断属于哪个等级,并修改artificer的yn_jfgz(等级标识)及rate(百分比)
|
||||
//组装对应的升级规则集合
|
||||
Long classifyId = jsPar.getClassifyId();
|
||||
String classifyId = jsPar.getClassifyId();
|
||||
// List<ArtificerPartitioningDetails> sjgzList = new ArrayList<>();
|
||||
Double zddj = Double.parseDouble(jsdqyj+"");
|
||||
Double jzl = Double.parseDouble(jsjzl);
|
||||
|
|
|
@ -45,6 +45,10 @@ public class TripController {
|
|||
@PostMapping("/insertTrip")
|
||||
@ApiOperation("添加出行方式")
|
||||
public Result insertTrip(@RequestBody Trip trip){
|
||||
List<Trip> list = tripService.list(new QueryWrapper<Trip>().like(StringUtils.isNotBlank(trip.getCity()),"city",trip.getCity()));
|
||||
if(list.size()>0){
|
||||
return Result.error(trip.getCity()+"已存在");
|
||||
}
|
||||
trip.setCreateTime(DateUtils.format(new Date()));
|
||||
tripService.save(trip);
|
||||
return Result.success();
|
||||
|
|
|
@ -30,6 +30,10 @@ public class AppTripController {
|
|||
return Result.success().put("data",tripService.list(new QueryWrapper<Trip>().like(StringUtils.isNotBlank(city),"city",city)));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/selectCityList")
|
||||
@ApiOperation("查询开放城市列表")
|
||||
public Result selectTripList(){
|
||||
return Result.success().put("data",tripService.list(new QueryWrapper<Trip>()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -79,20 +79,35 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<!-- <select id="selectArtificerById" resultType="com.sqx.modules.artificer.entity.Artificer">-->
|
||||
<!-- select a.*,u.phone,u.status as artificerStatus,u.consortia_id as consortiaId,c.consortia_name,u.invitation_code,-->
|
||||
<!-- (select count(*) from orders o where o.artificer_id = a.artificer_id and o.status in (3,5)) as ordersCount,-->
|
||||
<!-- (select code from sys_dict o where o.id = a.classify_id) as classifyName,-->
|
||||
<!-- (select count(*) from collect_artificer o where o.artificer_id = a.artificer_id and classify = 1) as collectCount,-->
|
||||
<!-- (select count(*) from collect_artificer o where o.artificer_id = a.artificer_id and o.user_id = #{userId} and classify = 1) as myCollectCount,-->
|
||||
<!-- ifnull((select avg(c.score) from taking_commnt c where c.artificer_id = a.artificer_id), 5.00) as ordersScore,-->
|
||||
<!-- (st_distance(point(a.longitude, a.latitude), point(#{longitude}, #{latitude})) * 111195) as distance,-->
|
||||
<!-- v.vip_name as technicianTypeName,v.rate as technicianTypeRate ,(CASE WHEN DATEDIFF(CURDATE(), a.create_time) <=7 THEN 1 ELSE 2 END) AS isNewer-->
|
||||
<!-- from artificer a-->
|
||||
<!-- left join tb_user u on a.user_id = u.user_id-->
|
||||
<!-- left join sys_dict s on s.id=a.classify_id-->
|
||||
<!-- left join vip_details v on a.technician_type = v.vip_name_type and v.vip_type = 1-->
|
||||
<!-- left join consortia c on u.consortia_id = c.consortia_id-->
|
||||
<!-- where a.artificer_id = #{artificerId}-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="selectArtificerById" resultType="com.sqx.modules.artificer.entity.Artificer">
|
||||
select a.*,u.phone,u.status as artificerStatus,u.consortia_id as consortiaId,c.consortia_name,u.invitation_code,
|
||||
(select count(*) from orders o where o.artificer_id = a.artificer_id and o.status in (3,5)) as ordersCount,
|
||||
(select code from sys_dict o where o.id = a.classify_id) as classifyName,
|
||||
(select count(*) from collect_artificer o where o.artificer_id = a.artificer_id and classify = 1) as collectCount,
|
||||
(select count(*) from collect_artificer o where o.artificer_id = a.artificer_id and o.user_id = #{userId} and classify = 1) as myCollectCount,
|
||||
ifnull((select avg(c.score) from taking_commnt c where c.artificer_id = a.artificer_id), 5.00) as ordersScore,
|
||||
(st_distance(point(a.longitude, a.latitude), point(#{longitude}, #{latitude})) * 111195) as distance,
|
||||
v.vip_name as technicianTypeName,v.rate as technicianTypeRate ,(CASE WHEN DATEDIFF(CURDATE(), a.create_time) <=7 THEN 1 ELSE 2 END) AS isNewer
|
||||
from artificer a
|
||||
left join tb_user u on a.user_id = u.user_id
|
||||
left join sys_dict s on s.id=a.classify_id
|
||||
left join vip_details v on a.technician_type = v.vip_name_type and v.vip_type = 1
|
||||
left join consortia c on u.consortia_id = c.consortia_id
|
||||
left join tb_user u on a.user_id = u.user_id
|
||||
left join vip_details v on a.technician_type = v.vip_name_type and v.vip_type = 1
|
||||
left join consortia c on u.consortia_id = c.consortia_id
|
||||
where a.artificer_id = #{artificerId}
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue