Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
22e7bd641b
46
pom.xml
46
pom.xml
@ -167,8 +167,54 @@
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!-- 打包时去除第三方依赖 -->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<groupId>non-exists</groupId>
|
||||
<artifactId>non-exists</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 拷贝第三方依赖文件到指定目录 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- target/lib 是依赖jar包的输出目录,根据自己喜好配置 -->
|
||||
<outputDirectory>target/lib</outputDirectory>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
<stripVersion>false</stripVersion>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 排除静态资源,静态资源自行拷贝 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*.properties</exclude>
|
||||
<exclude>**/*.xml</exclude>
|
||||
<exclude>**/*.yml</exclude>
|
||||
<exclude>static/**</exclude>
|
||||
<exclude>templates/**</exclude>
|
||||
<exclude>mybatis/**</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
@ -43,7 +43,7 @@ public class UserExpandController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update-byuserid/{userId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) {
|
||||
public SuccessResult update(@PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) throws Exception {
|
||||
userExpandService.updateByUserId(null, userId, userExpandVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class UserExpandAppController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update-byuserid/{userId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult updateUserExpand(@RequestHeader("token") String token, @PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) {
|
||||
public SuccessResult updateUserExpand(@RequestHeader("token") String token, @PathVariable("userId") String userId, @RequestBody UserExpandVO userExpandVO) throws Exception {
|
||||
userExpandService.updateByUserId(token, userId, userExpandVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public interface IUserExpandService extends IUserExpandBaseService<UserExpandDTO
|
||||
* @param userId
|
||||
* @param userExpandVO
|
||||
*/
|
||||
void updateByUserId(String token, String userId, UserExpandVO userExpandVO);
|
||||
void updateByUserId(String token, String userId, UserExpandVO userExpandVO) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -53,13 +53,13 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
|
||||
@Override
|
||||
public UserExpandDTO getByUserId(String userId) {
|
||||
UserDTO userDTO = userService.get(userId);
|
||||
if(userDTO == null){
|
||||
if (userDTO == null) {
|
||||
throw new SearchException("用户不存在");
|
||||
}
|
||||
Map<String,Object> params = super.getHashMap(3);
|
||||
params.put("userId",userId);
|
||||
Map<String, Object> params = super.getHashMap(3);
|
||||
params.put("userId", userId);
|
||||
UserExpandDTO userExpandDTO = this.get(params);
|
||||
if(userExpandDTO == null){
|
||||
if (userExpandDTO == null) {
|
||||
userExpandDTO = new UserExpandDTO();
|
||||
}
|
||||
userExpandDTO.setUserName(userDTO.getUserName());
|
||||
@ -69,32 +69,28 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
|
||||
}
|
||||
|
||||
|
||||
public void updateByUserId(String token, String userId, UserExpandVO userExpandVO){
|
||||
Map<String,Object> params = super.getHashMap(1);
|
||||
public void updateByUserId(String token, String userId, UserExpandVO userExpandVO) throws Exception {
|
||||
Map<String, Object> params = super.getHashMap(1);
|
||||
params.put("userId", userId);
|
||||
UserExpandDTO userExpandDTO = this.get(params);
|
||||
// 1.保存拓展信息
|
||||
if(userExpandDTO == null){
|
||||
if (userExpandDTO == null) {
|
||||
this.saveReturnId(token, userId, userExpandVO);
|
||||
}else{
|
||||
this.update(token,userExpandDTO.getUserExpandId(),userExpandVO);
|
||||
} else {
|
||||
this.update(token, userExpandDTO.getUserExpandId(), userExpandVO);
|
||||
}
|
||||
if (StringUtils.isBlank(token)) {
|
||||
return;
|
||||
}
|
||||
// 2.更新用户信息
|
||||
UpdateUserVO updateUserVO = new UpdateUserVO();
|
||||
try {
|
||||
updateUserVO.setName(userExpandVO.getName());
|
||||
updateUserVO.setPhone(userExpandVO.getPhone());
|
||||
updateUserVO.setEmail(userExpandVO.getEmail());
|
||||
userService.updateInfo(token,updateUserVO);
|
||||
} catch (Exception e) {
|
||||
throw new UpdateException("更新用户信息失败");
|
||||
}
|
||||
|
||||
|
||||
updateUserVO.setName(userExpandVO.getName());
|
||||
updateUserVO.setPhone(userExpandVO.getPhone());
|
||||
updateUserVO.setEmail(userExpandVO.getEmail());
|
||||
userService.updateInfo(token, updateUserVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public UserExpandDTO getByUsername(String username) {
|
||||
return null;
|
||||
@ -137,11 +133,6 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void save(UserExpandVO userExpandVO) {
|
||||
saveReturnId(userExpandVO);
|
||||
@ -156,6 +147,7 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
|
||||
public String saveReturnId(UserExpandVO userExpandVO) {
|
||||
return saveReturnId(null, userExpandVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(String token, UserExpandVO userExpandVO) {
|
||||
String userExpandId = UUIDUtil.getUUID();
|
||||
@ -287,7 +279,6 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
Integer count = userExpandDao.count(params);
|
||||
|
@ -175,7 +175,15 @@
|
||||
AND t1.order_type = '1'
|
||||
</if>
|
||||
GROUP BY
|
||||
t1.ground_booking_id
|
||||
t1.ground_booking_id,
|
||||
t1.serial,
|
||||
t1.venues_name,
|
||||
t1.project_name,
|
||||
t1.order_type,
|
||||
t1.gmt_create,
|
||||
t2.venue_panorama,
|
||||
t3.price,
|
||||
t3.booking_item_id
|
||||
ORDER BY
|
||||
t1.order_type ASC,t1.gmt_create DESC
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user