|
@@ -2,6 +2,8 @@ package com.sky.mapper;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.sky.entity.Employee;
|
|
|
+import com.sky.entity.landimg;
|
|
|
+import com.sky.result.Result;
|
|
|
import org.apache.ibatis.annotations.Insert;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
@@ -10,18 +12,24 @@ import java.time.LocalDate;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Mapper
|
|
|
-public interface EmployeeMapper {
|
|
|
+public interface EmployeeMapper {
|
|
|
|
|
|
/**
|
|
|
* 根据用户名查询员工
|
|
|
+ *
|
|
|
* @param username
|
|
|
* @return
|
|
|
*/
|
|
|
@Select("select * from t_expert where user = #{username}")
|
|
|
Employee getByUsername(String username);
|
|
|
+
|
|
|
@Select("SELECT * FROM t_loc64 WHERE SQRT( POW(PI() * 12656 * COS((#{volatitude} + lat) * PI() / 360) * (#{volongitude} - lng) / 180, 2) + POW(PI() * 12656 * ((#{volatitude} - lat) / 180), 2) ) < 100 limit 3")
|
|
|
List<Employee> getLocation(double volatitude, double volongitude);
|
|
|
+
|
|
|
@Insert("INSERT INTO t_landimg (author, site, pzdt, imgurl)\n" +
|
|
|
"VALUES (#{author}, #{site}, #{pzdt}, #{imgurl})")
|
|
|
void postform(String author, String site, LocalDate pzdt, String imgurl);
|
|
|
+
|
|
|
+ @Select("SELECT * FROM t_landimg where author = (SELECT user FROM t_expert WHERE phone = #{phone} )")
|
|
|
+ List<landimg> getLandimgByPhone(String phone);
|
|
|
}
|