Browse Source

修改经纬度

dev
HAHA 3 years ago
parent
commit
2ca203c43b
  1. 28
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LonAndLatFormDTO.java
  2. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVolunteerPolyController.java
  3. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVolunteerPolyDao.java
  4. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVolunteerPolyService.java
  5. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java
  6. 7
      epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml

28
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/LonAndLatFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
@Data
public class LonAndLatFormDTO implements Serializable {
private static final long serialVersionUID = -4097378626418182909L;
private String customerId;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 关联关系
*/
private String icResiUser;
}

18
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVolunteerPolyController.java

@ -12,6 +12,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.IcVolunteerPolyDTO; import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.form.LonAndLatFormDTO;
import com.epmet.dto.form.VolunteerPolyListFormDTO; import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO; import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.form.VolunteerPolyPieFormDTO; import com.epmet.dto.form.VolunteerPolyPieFormDTO;
@ -150,4 +151,21 @@ public class IcVolunteerPolyController {
return new Result<List<VolunteerPolyPieResultDTO>>().ok(dto); return new Result<List<VolunteerPolyPieResultDTO>>().ok(dto);
} }
/**
* 修改经纬度
*
* @param tokenDto
* @param form
* @return com.epmet.commons.tools.utils.Result
* @author LZN
* @date 2022/5/24 15:07
*/
@PostMapping("LonAndLat")
public Result LonAndLat(@LoginUser TokenDto tokenDto, @RequestBody LonAndLatFormDTO form) {
form.setIcResiUser(tokenDto.getUserId());
form.setCustomerId(tokenDto.getCustomerId());
icVolunteerPolyService.updateLonAndLat(form);
return new Result();
}
} }

4
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVolunteerPolyDao.java

@ -1,6 +1,7 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.LonAndLatFormDTO;
import com.epmet.dto.form.VolunteerPolyPieFormDTO; import com.epmet.dto.form.VolunteerPolyPieFormDTO;
import com.epmet.dto.result.VolunteerPolyListResultDTO; import com.epmet.dto.result.VolunteerPolyListResultDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO; import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
@ -40,4 +41,7 @@ public interface IcVolunteerPolyDao extends BaseDao<IcVolunteerPolyEntity> {
void deleteCategoryByCustomerId(@Param("customerId") String customerId); void deleteCategoryByCustomerId(@Param("customerId") String customerId);
List<VolunteerPolyPieResultDTO> getStatistics(VolunteerPolyPieFormDTO form); List<VolunteerPolyPieResultDTO> getStatistics(VolunteerPolyPieFormDTO form);
void updateLonAndLat(@Param("form") LonAndLatFormDTO form);
} }

11
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVolunteerPolyService.java

@ -4,6 +4,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO; import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcVolunteerPolyDTO; import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.form.LonAndLatFormDTO;
import com.epmet.dto.form.VolunteerPolyListFormDTO; import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO; import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.form.VolunteerPolyPieFormDTO; import com.epmet.dto.form.VolunteerPolyPieFormDTO;
@ -131,4 +132,14 @@ public interface IcVolunteerPolyService extends BaseService<IcVolunteerPolyEntit
* @date 2022/5/19 17:21 * @date 2022/5/19 17:21
*/ */
List<VolunteerPolyPieResultDTO> getStatistics(VolunteerPolyPieFormDTO form); List<VolunteerPolyPieResultDTO> getStatistics(VolunteerPolyPieFormDTO form);
/**
* 修改经纬度
*
* @param form
* @return void
* @author LZN
* @date 2022/5/24 15:07
*/
void updateLonAndLat(LonAndLatFormDTO form);
} }

18
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVolunteerPolyServiceImpl.java

@ -24,10 +24,7 @@ import com.epmet.dao.IcVolunteerPolyDao;
import com.epmet.dao.UserBaseInfoDao; import com.epmet.dao.UserBaseInfoDao;
import com.epmet.dto.IcVolunteerPolyDTO; import com.epmet.dto.IcVolunteerPolyDTO;
import com.epmet.dto.VolunteerInfoDTO; import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.IcFormOptionsQueryFormDTO; import com.epmet.dto.form.*;
import com.epmet.dto.form.VolunteerPolyListFormDTO;
import com.epmet.dto.form.VolunteerPolyMapDataFormDTO;
import com.epmet.dto.form.VolunteerPolyPieFormDTO;
import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.ResiUserBaseInfoResultDTO;
import com.epmet.dto.result.VolunteerPolyListResultDTO; import com.epmet.dto.result.VolunteerPolyListResultDTO;
import com.epmet.dto.result.VolunteerPolyMapDataResultDTO; import com.epmet.dto.result.VolunteerPolyMapDataResultDTO;
@ -469,4 +466,17 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
/**
* 修改经纬度
*
* @param form
* @return void
* @author LZN
* @date 2022/5/24 15:08
*/
@Override
public void updateLonAndLat(LonAndLatFormDTO form) {
baseDao.updateLonAndLat(form);
}
} }

7
epmet-user/epmet-user-server/src/main/resources/mapper/IcVolunteerPolyDao.xml

@ -21,6 +21,13 @@
<result property="createdBy" column="CREATED_BY"/> <result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/> <result property="createdTime" column="CREATED_TIME"/>
</resultMap> </resultMap>
<update id="updateLonAndLat">
UPDATE ic_volunteer_poly p
SET p.LONGITUDE = #{form.longitude},
p.LATITUDE = #{form.latitude}
WHERE
p.IC_RESI_USER = #{form.icResiUser}
</update>
<select id="getMapData" resultType="com.epmet.dto.result.VolunteerPolyMapDataResultDTO"> <select id="getMapData" resultType="com.epmet.dto.result.VolunteerPolyMapDataResultDTO">
SELECT SELECT
u.id, u.id,

Loading…
Cancel
Save