Commit df756f22 authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://10.5.52.3/youjj/cloud-platform into base-modify

parents 711096ee 683a0e06
...@@ -154,12 +154,14 @@ public class AuthController { ...@@ -154,12 +154,14 @@ public class AuthController {
log.info(username+"----require reset..."); log.info(username+"----require reset...");
JSONObject data=appAuthService.reset(username,mobilecode,password); JSONObject data=appAuthService.reset(username,mobilecode,password);
if(data!=null&&data.getInteger("status")== ResultCode.SUCCESS_CODE){ if(data!=null&&data.getInteger("status")== ResultCode.SUCCESS_CODE){
JwtAuthenticationRequest authenticationRequest=new JwtAuthenticationRequest(); JSONObject result=data.getJSONObject("data");
authenticationRequest.setUsername(username); if(result==null){
authenticationRequest.setPassword(password); data.put("status",1001);
String token=appAuthService.login(authenticationRequest); }else {
String token=appAuthService.getToken(username,result.getInteger("userId"));
data.put("token",token); data.put("token",token);
} }
}
return data; return data;
} }
......
...@@ -153,7 +153,7 @@ public class AppUserRest { ...@@ -153,7 +153,7 @@ public class AppUserRest {
@RequestMapping(value = "/user/reset", method = RequestMethod.POST) @RequestMapping(value = "/user/reset", method = RequestMethod.POST)
public @ResponseBody public @ResponseBody
JSONObject login( JSONObject reset(
@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="username",defaultValue="")String username,
@RequestParam(value="mobilecode",defaultValue="")String mobilecode, @RequestParam(value="mobilecode",defaultValue="")String mobilecode,
@RequestParam(value="password",defaultValue="")String password @RequestParam(value="password",defaultValue="")String password
......
...@@ -532,6 +532,14 @@ public class AppPermissionService { ...@@ -532,6 +532,14 @@ public class AppPermissionService {
Integer userid = user.getId(); Integer userid = user.getId();
String nickname = SystemConfig.USER_NIKENAME_DEFAULT + (int) ((Math.random() * 9 + 1) * 100000); String nickname = SystemConfig.USER_NIKENAME_DEFAULT + (int) ((Math.random() * 9 + 1) * 100000);
JSONObject data = autoLogin(userid, user.getUsername(), SystemConfig.USER_HEADER_URL_DEFAULT, nickname); JSONObject data = autoLogin(userid, user.getUsername(), SystemConfig.USER_HEADER_URL_DEFAULT, nickname);
// 到im注册,获取返回结果
Integer imUserId=user.getImUserid();
String imPassword=user.getImPassword();
if(StringUtils.isNotBlank(imPassword)&&imUserId!=null&&imUserId>0){
String access_token=loginIm(username,imPassword,imUserId);
data.put("imToken",access_token);
data.put("imUserId",imUserId);
}
if (data != null) { if (data != null) {
return JsonResultUtil.createSuccessResultWithObj(data); return JsonResultUtil.createSuccessResultWithObj(data);
} }
......
package com.xxfc.platform.app.entity.vo;
import lombok.Data;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/6/28 9:34
*/
@Data
public class BannerVo {
/**
* 封面地址
*/
private String cover;
/**
* 跳转链接地址
*/
private String url;
}
...@@ -4,10 +4,12 @@ import com.github.wxiaoqi.security.admin.feign.dto.UserDTO; ...@@ -4,10 +4,12 @@ import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.app.entity.Banner; import com.xxfc.platform.app.entity.Banner;
import com.xxfc.platform.app.entity.vo.BannerVo;
import com.xxfc.platform.app.mapper.BannerMapper; import com.xxfc.platform.app.mapper.BannerMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.Instant; import java.time.Instant;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -30,8 +32,16 @@ public class BannerBiz extends BaseBiz<BannerMapper,Banner> { ...@@ -30,8 +32,16 @@ public class BannerBiz extends BaseBiz<BannerMapper,Banner> {
this.deleteById(id); this.deleteById(id);
}*/ }*/
public List<Banner> findBannerList(Integer type) { public List<BannerVo> findBannerList(Integer type) {
return mapper.findBannerListByType(type); List<BannerVo> bannerVos = new ArrayList<>();
List<Banner> banners = mapper.findBannerListByType(type);
banners.forEach(banner -> {
BannerVo bannerVo = new BannerVo();
bannerVo.setCover(banner.getCover());
banner.setUrl(banner.getUrl());
bannerVos.add(bannerVo);
});
return bannerVos;
} }
/* /*
......
...@@ -2,7 +2,7 @@ package com.xxfc.platform.app.rest; ...@@ -2,7 +2,7 @@ package com.xxfc.platform.app.rest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.app.biz.BannerBiz; import com.xxfc.platform.app.biz.BannerBiz;
import com.xxfc.platform.app.entity.Banner; import com.xxfc.platform.app.entity.vo.BannerVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -33,7 +33,7 @@ public class BannerController { ...@@ -33,7 +33,7 @@ public class BannerController {
if (type==null) { if (type==null) {
return ObjectRestResponse.createDefaultFail(); return ObjectRestResponse.createDefaultFail();
} }
List<Banner> bannerList = bannerBiz.findBannerList(type); List<BannerVo> bannerList = bannerBiz.findBannerList(type);
return ObjectRestResponse.succ(bannerList); return ObjectRestResponse.succ(bannerList);
} }
} }
...@@ -19,6 +19,17 @@ ...@@ -19,6 +19,17 @@
<artifactId>xx-campsite-api</artifactId> <artifactId>xx-campsite-api</artifactId>
<version>2.0-SNAPSHOT</version> <version>2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.github.wxiaoqi</groupId>
<artifactId>ace-common</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.2.0.Final</version>
</dependency>-->
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -61,6 +61,7 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper,CampsiteShop> { ...@@ -61,6 +61,7 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper,CampsiteShop> {
campsiteShopPageDataVO.setPageSize(pageDataVO.getPageSize()); campsiteShopPageDataVO.setPageSize(pageDataVO.getPageSize());
campsiteShopPageDataVO.setPageNum(pageDataVO.getPageNum()); campsiteShopPageDataVO.setPageNum(pageDataVO.getPageNum());
if (CollectionUtils.isEmpty(campsiteShopPageDTOS)){ if (CollectionUtils.isEmpty(campsiteShopPageDTOS)){
campsiteShopPageDataVO.setData(new ArrayList<CampsiteShopPageVo>());
return campsiteShopPageDataVO; return campsiteShopPageDataVO;
} }
if (log.isDebugEnabled()){ if (log.isDebugEnabled()){
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<select id="findAllByHome" resultType="com.github.wxiaoqi.security.common.vo.GoodDataVO"> <select id="findAllByHome" resultType="com.github.wxiaoqi.security.common.vo.GoodDataVO">
select cs.id as `id`,cs.name as `name`,cs.logo as `imgUrl`,cs.province_name as `name1`,cs.longitude,cs.latitude select cs.id as `id`,cs.name as `name`,cs.logo as `imgUrl`,cs.province_name as `name1`,cs.longitude,cs.latitude
FROM `campsite_shop` cs FROM `campsite_shop` cs
where cs.sale_state=1 where cs.sale_state=1 and cs.is_del=0
order by cs.hot desc order by cs.hot desc
limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER} limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER}
</select> </select>
......
...@@ -169,4 +169,5 @@ public class TourTagBannerBiz extends BaseBiz<TourTagBannerMapper,TourTagBanner> ...@@ -169,4 +169,5 @@ public class TourTagBannerBiz extends BaseBiz<TourTagBannerMapper,TourTagBanner>
} }
return tourTagBannerDTOS.stream().collect(Collectors.groupingBy(TourTagBannerDTO::getTagId)); return tourTagBannerDTOS.stream().collect(Collectors.groupingBy(TourTagBannerDTO::getTagId));
} }
} }
\ No newline at end of file
package com.xxfc.platform.tour.rest; package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.msg.ListRestResponse;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourTagBannerBiz; import com.xxfc.platform.tour.biz.TourTagBannerBiz;
import com.xxfc.platform.tour.dto.TourTagBannerDTO;
import com.xxfc.platform.tour.entity.TourTagBanner; import com.xxfc.platform.tour.entity.TourTagBanner;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -16,7 +16,6 @@ public class TourTagBannerController extends BaseController<TourTagBannerBiz,Tou ...@@ -16,7 +16,6 @@ public class TourTagBannerController extends BaseController<TourTagBannerBiz,Tou
@Autowired @Autowired
private TourTagBannerBiz tagBannerBiz; private TourTagBannerBiz tagBannerBiz;
@GetMapping("/app/unauth/findById/{tid}") @GetMapping("/app/unauth/findById/{tid}")
...@@ -26,7 +25,10 @@ public class TourTagBannerController extends BaseController<TourTagBannerBiz,Tou ...@@ -26,7 +25,10 @@ public class TourTagBannerController extends BaseController<TourTagBannerBiz,Tou
return ObjectRestResponse.succ(tourTagBanners); return ObjectRestResponse.succ(tourTagBanners);
} }
@GetMapping("/app/unauth/findByType/{type}")
public ObjectRestResponse findByType(@PathVariable Integer type) {
List<TourTagBannerDTO> tourTagBannerDTOS = tagBannerBiz.findTourTagBannersByTagId(type);
return ObjectRestResponse.succ(tourTagBannerDTOS);
}
} }
\ No newline at end of file
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
from tour_good g from tour_good g
LEFT JOIN tour_good_tag tag ON g.id=tag.good_id LEFT JOIN tour_good_tag tag ON g.id=tag.good_id
LEFT JOIN tour_tag t ON tag.tag_id=t.id LEFT JOIN tour_tag t ON tag.tag_id=t.id
where g.recommend=1 where g.recommend=1 and g.status=1 and g.is_del=0
GROUP BY g.id GROUP BY g.id
ORDER BY g.rank DESC ,g.id DESC ORDER BY g.rank DESC ,g.id DESC
limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER} limit #{start,jdbcType=INTEGER},#{size,jdbcType=INTEGER}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment