Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | VUE_APP_BASE_API = 'http://localhost:10028' |
| | | VUE_APP_BASE_API = 'http://192.168.0.135:10028' |
| | |
| | | "clipboard": "^2.0.4" |
| | | } |
| | | }, |
| | | "vue-jsonp": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmmirror.com/vue-jsonp/-/vue-jsonp-2.0.0.tgz", |
| | | "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" |
| | | }, |
| | | "vue-loader": { |
| | | "version": "15.9.7", |
| | | "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-15.9.7.tgz", |
| | |
| | | "vue": "^2.6.11", |
| | | "vue-clipboard2": "^0.3.1", |
| | | "vue-json-viewer": "^2.2.22", |
| | | "vue-jsonp": "^2.0.0", |
| | | "vue-router": "^3.5.1", |
| | | "vuescroll": "^4.17.3", |
| | | "vuex": "^3.4.0", |
| | |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <link rel="icon" href="<%= BASE_URL %>faviconzb.ico"> |
| | | <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script> |
| | | <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&libraries=service&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script> |
| | | <!-- <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script> |
| | | <script type="text/javascript" src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script> |
| | | <script type="text/javascript" src="https://map.qq.com/api/gljs?v=1.exp&key=HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ"></script>--> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { jsonp } from 'vue-jsonp' |
| | | |
| | | export default { |
| | | name: 'OperaShopWindow', |
| | | extends: BaseOpera, |
| | |
| | | return { |
| | | geocoder: null, |
| | | map: [], |
| | | searchValue:'', |
| | | marker:null, |
| | | searchValue: '', |
| | | marker: null, |
| | | // è¡¨åæ°æ® |
| | | provinces: [], |
| | | cities: [], |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | searchAddress( ){ |
| | | if(this.geocoder && this.searchValue){ |
| | | this.geocoder.getLocation(this.searchValue) |
| | | searchAddress () { |
| | | if ( this.searchValue) { |
| | | var that = this |
| | | jsonp('https://apis.map.qq.com/ws/geocoder/v1/', { |
| | | address: this.searchValue, |
| | | key: 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ', |
| | | output: 'jsonp' |
| | | }).then(result => { |
| | | console.log(result) |
| | | if(result.result.location){ |
| | | that.changePostion(result.result.location.lng, result.result.location.lat) |
| | | } |
| | | }).catch(error => { |
| | | // 请æ±å¤±è´¥å¤ç |
| | | console.log(error) |
| | | }) |
| | | } |
| | | }, |
| | | initMap (lat, long) { |
| | |
| | | center: center, |
| | | zoom: 17 |
| | | }) |
| | | this.changePostion(long,lat) |
| | | this.changePostion(long, lat) |
| | | qq.maps.event.addListener(this.map, 'click', |
| | | function (event) { |
| | | that.changePostion(event.latLng.lng, event.latLng.lat) |
| | | } |
| | | ) |
| | | this.geocoder = new qq.maps.Geocoder() |
| | | /* this.geocoder = new qq.maps.Geocoder() |
| | | this.geocoder.setComplete(function (result) { |
| | | that.changePostion(result.detail.location.lng,result.detail.location.lat) |
| | | that.changePostion(result.detail.location.lng, result.detail.location.lat) |
| | | }) |
| | | // è¥æå¡è¯·æ±å¤±è´¥ï¼åè¿è¡ä»¥ä¸å½æ° |
| | | this.geocoder.setError(function () { |
| | | console.log('éè§£æå¤±è´¥') |
| | | }) |
| | | this.geocoder.setError(function (e) { |
| | | console.log(that.searchValue + '=====éè§£æå¤±è´¥') |
| | | })*/ |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | |
| | | const mapContainer = this.$refs.mapContainer // è·åå°å¾å®¹å¨ |
| | | if (mapContainer) { |
| | | // åå§åå°å¾ä¹åæ£æ¥å®¹å¨æ¯å¦åå¨ |
| | | this.initMap(this.form.latitude,this.form.longitude) |
| | | this.initMap(this.form.latitude, this.form.longitude) |
| | | // åå§åè
¾è®¯å°å¾ |
| | | } |
| | | }) |
| | |
| | | .then(res => { |
| | | this.provinces = res |
| | | }) |
| | | if(this.form.provinceCode){ |
| | | this.selectProvince(this.form.provinceCode,true) |
| | | if (this.form.provinceCode) { |
| | | this.selectProvince(this.form.provinceCode, true) |
| | | } |
| | | }, |
| | | // éæ©ç份 |
| | | selectProvince (val,isInit) { |
| | | selectProvince (val, isInit) { |
| | | this.provinces.forEach(item => { |
| | | if (item.id == val) { |
| | | this.form.provinceName = item.name |
| | |
| | | }) |
| | | this.cities = [] |
| | | this.areas = [] |
| | | if(!isInit){ |
| | | if (!isInit) { |
| | | this.form.cityName = '' |
| | | this.form.areaCode = '' |
| | | this.form.cityCode = '' |
| | | this.form.areaName = '' |
| | | } |
| | | if(!val || val ==''){ |
| | | if (!val || val == '') { |
| | | return |
| | | } |
| | | this.api.areaList({ pid: val }) |
| | | .then(res => { |
| | | this.cities = res |
| | | if(isInit){ |
| | | this.selectCity(this.form.cityCode,isInit) |
| | | if (isInit) { |
| | | this.selectCity(this.form.cityCode, isInit) |
| | | } |
| | | }) |
| | | }, |
| | | // éæ©åå¸ |
| | | selectCity (val,isInit) { |
| | | selectCity (val, isInit) { |
| | | this.cities.forEach(item => { |
| | | if (item.id == val) { |
| | | this.form.cityName = item.name |
| | | } |
| | | }) |
| | | this.areas = [] |
| | | if(!isInit){ |
| | | if (!isInit) { |
| | | this.form.areaCode = '' |
| | | this.form.areaName = '' |
| | | } |
| | | if(!val || val ==''){ |
| | | if (!val || val == '') { |
| | | return |
| | | } |
| | | this.api.areaList({ pid: val }) |
| | |
| | | } |
| | | }) |
| | | }, |
| | | changeMapCenter(){ |
| | | this.searchValue = (this.form.provinceName||'')+(this.form.cityName||'')+(this.form.areaName||'')+(this.form.address||'') |
| | | changeMapCenter () { |
| | | this.searchValue = (this.form.provinceName || '') + (this.form.cityName || '') + (this.form.areaName || '') + (this.form.address || '') |
| | | this.searchAddress() |
| | | }, |
| | | changePostion (lng, lat) { |
| | | if (lng || lat) { |
| | | this.form.longitude = lng |
| | | this.form.latitude = lat |
| | | if(this.map){ |
| | | if(this.marker){ |
| | | if (this.map) { |
| | | if (this.marker) { |
| | | this.marker.setMap(null) |
| | | } |
| | | var pos =new qq.maps.LatLng(lat,lng); |
| | | var pos = new qq.maps.LatLng(lat, lng) |
| | | this.map.setCenter(pos) |
| | | this.marker= new qq.maps.Marker({ |
| | | this.marker = new qq.maps.Marker({ |
| | | position: pos, |
| | | animation:qq.maps.MarkerAnimation.DROP, |
| | | map:this.map |
| | | animation: qq.maps.MarkerAnimation.DROP, |
| | | map: this.map |
| | | }) |
| | | } |
| | | } |
| | |
| | | // @ApiModelProperty(value = "æ ç¾") |
| | | // private String tagCodes; |
| | | |
| | | @ApiModelProperty(value = "æåºæ¹å¼ NORMAL - é»è®¤ï¼HOT - æçï¼LATEST - ææ°ï¼") |
| | | @ApiModelProperty(value = "æåº é»è®¤ä¸ä¼ ï¼æçgreetï¼ææ°time") |
| | | private String sortType; |
| | | |
| | | @ApiModelProperty(value = "å¤ä¸ªæ ç¾å¯ä¸ç¼ç çå表ï¼å¤ä¸ªæ ç¾å¯ä¸ç¼ç çå表") |
| | |
| | | package com.doumee.biz.zbom.model.zhongtai.response; |
| | | |
| | | import com.doumee.biz.zbom.model.zhongtai.APISpaceCaseVo; |
| | | import com.doumee.dao.business.model.Users; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | |
| | | private List<String> imageurlList; |
| | | |
| | | private Users users; |
| | | |
| | | } |
| | |
| | | public static final String ZBOM = "ZBOM" ; |
| | | public static final String ZBOM_IAM_APPKEY = "ZBOM_IAM_APPKEY"; |
| | | public static final String ZBOM_IAM_APPID = "ZBOM_IAM_APPID"; |
| | | public static final String ZBOM_PAD_INTERFACE_KEY = "ZBOM_PAD_INTERFACE_KEY"; |
| | | public static final String USER_CARD_HEADER_IMG ="USER_CARD_HEADER_IMG" ; |
| | | public static final String USER_CARD_PHONE_IMG ="USER_CARD_PHONE_IMG" ; |
| | | public static final String USER_CARD_ADDR_IMG ="USER_CARD_ADDR_IMG" ; |
| | |
| | | // æ£å¼ç为 "release"ï¼ä½éªç为 "trial"ï¼å¼åç为 "develop"ãé»è®¤æ¯æ£å¼çã |
| | | String env_version = "trial"; |
| | | body.put("env_version", env_version); |
| | | if(env_version.equals("release")){ |
| | | if(env_version.equals("release")&&StringUtils.isNotBlank(page)){ |
| | | body.put("page", page); |
| | | } |
| | | // éæï¼æ ¹æ®ä½ çåºæ¯èªè¡è®¾ç½®bodyåæ° |
| | |
| | | @TableField(exist = false) |
| | | private List<Multifile> fileList; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦æ¥è¯¢åå¸ï¼0=å¦ï¼1=æ¯") |
| | | @TableField(exist = false) |
| | | private Integer isPublish; |
| | | |
| | | @ApiModelProperty(value = "ç´ æç±»å 0æ¨å¹¿èµè®¯ 1å®å¶æå¡", example = "1") |
| | | @ExcelColumn(name="ç´ æç±»å 0æ¨å¹¿èµè®¯ 1å®å¶æå¡") |
| | | private Integer type; |
| | |
| | | |
| | | @ApiModelProperty(value = "纬度", example = "1") |
| | | private BigDecimal latitude; |
| | | |
| | | @ApiModelProperty(value = "æä½äºº", hidden = true) |
| | | private Long userId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.reqeust; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/7/25 10:35 |
| | | */ |
| | | @Data |
| | | public class GenerateQRCodeRequest { |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ç±»åï¼0:产å;1:æ¡ä¾;2:宿¯") |
| | | private Integer businessType; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ä¸»é®") |
| | | private String businessId; |
| | | |
| | | @ApiModelProperty(value = "iamç¼ç ") |
| | | private String iamId; |
| | | |
| | | @ApiModelProperty(value = "跳转å°å",hidden = true) |
| | | private String path; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | ZTProductInfoResponse getProductInfo(String id,String userType,Long userId); |
| | | ZTProductInfoResponse getProductInfo(String id,String userType,Long userId,String salesId); |
| | | |
| | | /** |
| | | * ä¸å° - å
¨å±èµè®¯è¯¦æ
|
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | ZTCaseInfoResponse getWholecaseInfo(String id,String userType,Long userId); |
| | | ZTCaseInfoResponse getWholecaseInfo(String id,String userType,Long userId,String salesId); |
| | | |
| | | /** |
| | | * ä¸å° - 产åèµè®¯è¯¦æ
|
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | ZTProductNewsInfoResponse getProductNewsInfo(String id,String userType,Long userId); |
| | | ZTProductNewsInfoResponse getProductNewsInfo(String id,String userType,Long userId,String salesId); |
| | | |
| | | /** |
| | | * ä¸å° - 宿¯æ¡ä¾ |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | ZTRealcaseInfoResponse getRealcaseInfo(String id,String userType,Long userId); |
| | | ZTRealcaseInfoResponse getRealcaseInfo(String id,String userType,Long userId,String salesId); |
| | | |
| | | /** |
| | | * ä¸å° - æçæ¶è/忬¢å表 |
| | |
| | | import com.doumee.dao.business.model.Users; |
| | | import com.doumee.dao.web.reqeust.ContentShareImgDto; |
| | | import com.doumee.dao.web.reqeust.EditUsersRequest; |
| | | import com.doumee.dao.web.reqeust.GenerateQRCodeRequest; |
| | | import com.doumee.dao.web.reqeust.WxPhoneRequest; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.InputStream; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | ZTBaseRequst logOff(Long userId,String token); |
| | | |
| | | AccountResponse getWxMiniPhoneLogin(WxPhoneRequest wxPhoneRequest); |
| | | |
| | | InputStream getQrCode(GenerateQRCodeRequest generateQRCodeRequest); |
| | | } |
| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Users users = usersMapper.selectById(crmCustomerListRequest.getUserId()); |
| | | crmCustomerListRequest.setUserName(users.getIamUsername()); |
| | | if(StringUtils.isBlank(crmCustomerListRequest.getUserName())){ |
| | | Users users = usersMapper.selectById(crmCustomerListRequest.getUserId()); |
| | | crmCustomerListRequest.setUserName(users.getIamUsername()); |
| | | } |
| | | CRMBaseResponse<List<CRMCustomerListResponse>> crmBaseResponse = zbomCRMService.getCustomerList(crmCustomerListRequest); |
| | | if(Objects.isNull(crmBaseResponse)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"CRMæ¥å£è¯·æ±å¤±è´¥!"); |
| | |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.CustomerUserMapper; |
| | | import com.doumee.dao.business.IamInterfaceLogMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.UsersMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Users; |
| | | import com.doumee.dao.web.response.ZSZXCatalogResponse; |
| | | import com.doumee.dao.web.response.ZTBaseInfoResponse; |
| | | import com.doumee.service.business.GetZhongTaiDataService; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private CustomerUserMapper customerUserMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | |
| | | |
| | | |
| | | @Override |
| | | public ZTProductInfoResponse getProductInfo(String id,String userType,Long userId){ |
| | | public ZTProductInfoResponse getProductInfo(String id,String userType,Long userId,String salesId){ |
| | | //æ¥è¯¢ ä¸å° TOKEN |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType); |
| | | ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest(); |
| | |
| | | ztContentListRequest.setId(id); |
| | | ZTProductInfoResponse response = zbomZhongTaiService.getProductInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | | users.setImgurlFull(prefix + users.getImgurl()); |
| | | } |
| | | response.setUsers(users); |
| | | } |
| | | } |
| | | List<String> stringList = new ArrayList<String>(); |
| | | if (StringUtils.isNotBlank(response.getCoverImage())) { |
| | | stringList.add(response.getCoverImage()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ZTCaseInfoResponse getWholecaseInfo(String id,String userType,Long userId){ |
| | | public ZTCaseInfoResponse getWholecaseInfo(String id,String userType,Long userId,String salesId){ |
| | | //æ¥è¯¢ ä¸å° TOKEN |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType); |
| | | ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest(); |
| | |
| | | ztContentListRequest.setUserType(ztBaseInfoResponse.getUserType()); |
| | | ztContentListRequest.setId(id); |
| | | ZTCaseInfoResponse response = zbomZhongTaiService.getWholecaseInfo(ztContentListRequest); |
| | | List<String> stringList = new ArrayList<String>(); |
| | | if (StringUtils.isNotBlank(response.getCoverImage())) { |
| | | stringList.add(response.getCoverImage()); |
| | | } |
| | | if(Objects.nonNull(response.getLayoutUlr())){ |
| | | stringList.add(response.getLayoutUlr()); |
| | | } |
| | | APISpaceCaseVo[] apiSpaceCaseVoList = response.getApiSpaceCaseVos(); |
| | | if(Objects.nonNull(apiSpaceCaseVoList)){ |
| | | for (APISpaceCaseVo apiSpaceCaseVo:apiSpaceCaseVoList) { |
| | | if(StringUtils.isNotBlank(apiSpaceCaseVo.getCoverImage())){ |
| | | stringList.add(apiSpaceCaseVo.getCoverImage()); |
| | | } |
| | | if(Objects.nonNull(apiSpaceCaseVo.getImgList())){ |
| | | stringList.addAll(Arrays.asList(apiSpaceCaseVo.getImgList())); |
| | | if(Objects.nonNull(response)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | | users.setImgurlFull(prefix + users.getImgurl()); |
| | | } |
| | | response.setUsers(users); |
| | | } |
| | | } |
| | | List<String> stringList = new ArrayList<String>(); |
| | | if (StringUtils.isNotBlank(response.getCoverImage())) { |
| | | stringList.add(response.getCoverImage()); |
| | | } |
| | | if(Objects.nonNull(response.getLayoutUlr())){ |
| | | stringList.add(response.getLayoutUlr()); |
| | | } |
| | | APISpaceCaseVo[] apiSpaceCaseVoList = response.getApiSpaceCaseVos(); |
| | | if(Objects.nonNull(apiSpaceCaseVoList)){ |
| | | for (APISpaceCaseVo apiSpaceCaseVo:apiSpaceCaseVoList) { |
| | | if(StringUtils.isNotBlank(apiSpaceCaseVo.getCoverImage())){ |
| | | stringList.add(apiSpaceCaseVo.getCoverImage()); |
| | | } |
| | | if(Objects.nonNull(apiSpaceCaseVo.getImgList())){ |
| | | stringList.addAll(Arrays.asList(apiSpaceCaseVo.getImgList())); |
| | | } |
| | | } |
| | | } |
| | | response.setImageurlList(stringList); |
| | | } |
| | | response.setImageurlList(stringList); |
| | | return response; |
| | | } |
| | | |
| | | @Override |
| | | public ZTProductNewsInfoResponse getProductNewsInfo(String id,String userType,Long userId){ |
| | | public ZTProductNewsInfoResponse getProductNewsInfo(String id,String userType,Long userId,String salesId){ |
| | | //æ¥è¯¢ ä¸å° TOKEN |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType); |
| | | ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest(); |
| | |
| | | ztContentListRequest.setId(id); |
| | | ZTProductNewsInfoResponse response = zbomZhongTaiService.getProductNewsInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | | users.setImgurlFull(prefix + users.getImgurl()); |
| | | } |
| | | response.setUsers(users); |
| | | } |
| | | } |
| | | List<String> stringList = new ArrayList<String>(); |
| | | if (StringUtils.isNotBlank(response.getCoverImage())) { |
| | | stringList.add(response.getCoverImage()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ZTRealcaseInfoResponse getRealcaseInfo(String id,String userType,Long userId){ |
| | | public ZTRealcaseInfoResponse getRealcaseInfo(String id,String userType,Long userId,String salesId){ |
| | | //æ¥è¯¢ ä¸å° TOKEN |
| | | ZTBaseInfoResponse ztBaseInfoResponse = MemberServiceImpl.getZTToken(zbomZhongTaiService,memberMapper,usersMapper,systemDictDataBiz,userId,userType); |
| | | ZTContentInfoRequest ztContentListRequest = new ZTContentInfoRequest(); |
| | |
| | | ztContentListRequest.setId(id); |
| | | ZTRealcaseInfoResponse response = zbomZhongTaiService.getRealcaseInfo(ztContentListRequest); |
| | | if(Objects.nonNull(response)){ |
| | | //æ¥è¯¢å¯¼è´ä¿¡æ¯ è¿è¡ä¿¡æ¯ç»å®ä¸è¿å |
| | | if(StringUtils.isNotBlank(salesId)){ |
| | | Users users = usersMapper.selectById(salesId); |
| | | if(Objects.nonNull(users)){ |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,userId); |
| | | String prefix = StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode()) + |
| | | StringUtils.trimToNull(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.USERS_FILE).getCode()); |
| | | if(StringUtils.isNotBlank(users.getImgurl())){ |
| | | users.setImgurlFull(prefix + users.getImgurl()); |
| | | } |
| | | response.setUsers(users); |
| | | } |
| | | } |
| | | List<String> stringList = new ArrayList<String>(); |
| | | if (StringUtils.isNotBlank(response.getCoverImage())) { |
| | | stringList.add(response.getCoverImage()); |
| | |
| | | |
| | | |
| | | @Override |
| | | public AccountResponse wxLogin(String code,String iamId){ |
| | | public AccountResponse wxLogin(String code,String userId){ |
| | | try { |
| | | // è·åå¾®ä¿¡æææ°æ® |
| | | WxMaJscode2SessionResult session = WxMiniConfig.wxCustomerService.getUserService().getSessionInfo(code); |
| | |
| | | // String openId = code; |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().eq("OPENID", openId).isNotNull("phone")); |
| | | Users users = new Users(); |
| | | if(StringUtils.isNotBlank(iamId)){ |
| | | users = usersMapper.selectOne(new QueryWrapper<Users>().lambda() |
| | | .eq(Users::getIamId,iamId) |
| | | .last("limit 1") |
| | | ); |
| | | if(StringUtils.isNotBlank(userId)){ |
| | | users = usersMapper.selectById(userId); |
| | | } |
| | | if (member == null) { |
| | | member = new Member(); |
| | |
| | | member.setToken(ztUserGetTokenResponse.getToken()); |
| | | } |
| | | memberMapper.insert(member); |
| | | this.saveCustomerUser(users,member.getId()); |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,member.getId()); |
| | | }else{ |
| | | ZTUserGetTokenResponse ztUserGetTokenResponse = this.syncZhongTaiUser(member); |
| | | if(!Objects.isNull(ztUserGetTokenResponse)){ |
| | | member.setToken(ztUserGetTokenResponse.getToken()); |
| | | memberMapper.updateById(member); |
| | | } |
| | | this.saveCustomerUser(users,member.getId()); |
| | | MemberServiceImpl.saveCustomerUser(customerUserMapper,users,member.getId()); |
| | | member = this.getMemberInfo(member.getId()); |
| | | } |
| | | String token = JwtTokenUtil.generateTokenForZb(member.getId(),ZTConstants.CUSTOMER, JSONObject.toJSON(member).toString(),redisTemplate); |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"微信ç»å½å¼å¸¸ï¼è¯·è系管çå"); |
| | | } |
| | | |
| | | public void saveCustomerUser(Users users,Long memberId){ |
| | | public static void saveCustomerUser(CustomerUserMapper customerUserMapper,Users users,Long memberId){ |
| | | if(Objects.nonNull(users)&&Objects.nonNull(memberId)) { |
| | | if (customerUserMapper.selectCount(new QueryWrapper<CustomerUser>().lambda() |
| | | .eq(CustomerUser::getIsdeleted, Constants.ZERO) |
| | |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.eq(News::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if(pageWrap.getModel().getIsPublish()!=null && Constants.equalsInteger(pageWrap.getModel().getIsPublish(),Constants.ONE)){ |
| | | queryWrapper.apply(" now() >= t.PUBLISH_DATE "); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.eq(News::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | |
| | | dailyUpdatesResponse.setShareNum( |
| | | actionsMapper.selectCount(new QueryWrapper<Actions>()) |
| | | ); |
| | | dailyUpdatesResponse.setNewsList( |
| | | this.getCustomizedNewsList(Constants.ZERO,Constants.THREE,Constants.ZERO) |
| | | List<News> list = newsMapper.selectList(new QueryWrapper<News>().lambda() |
| | | .eq(News::getIsdeleted,Constants.ZERO) |
| | | .eq(News::getType,Constants.ZERO) |
| | | .eq(News::getStatus,Constants.ZERO) |
| | | .eq(News::getFileType,Constants.ZERO) |
| | | .last( "limit 3" ) |
| | | .orderByDesc(News::getCreateDate) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(list)){ |
| | | List<Long> idList = list.stream().map(i->i.getId()).collect(Collectors.toList()); |
| | | List<Multifile> files = dealMultifileList(idList); |
| | | for(News model : list){ |
| | | setFilelistById(model,files); |
| | | } |
| | | } |
| | | dailyUpdatesResponse.setNewsList(list); |
| | | return dailyUpdatesResponse; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void updateById(Shop shop) { |
| | | shopMapper.updateById(shop); |
| | | usersMapper.update(new UpdateWrapper<Users>().lambda() |
| | | .set(Users::getCardImg,null) |
| | | .isNotNull(Users::getCardImg) |
| | | .eq(Users::getDepartmentId,shop.getId()) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | |
| | | Shop updShop = new Shop(); |
| | | BeanUtils.copyProperties(editShopDTO,updShop); |
| | | shopMapper.updateById(updShop); |
| | | usersMapper.update(new UpdateWrapper<Users>().lambda() |
| | | .set(Users::getCardImg,null) |
| | | .isNotNull(Users::getCardImg) |
| | | .eq(Users::getDepartmentId,shop.getId()) |
| | | ); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.reqeust.EditUsersRequest; |
| | | import com.doumee.dao.web.reqeust.ContentShareImgDto; |
| | | import com.doumee.dao.web.reqeust.GenerateQRCodeRequest; |
| | | import com.doumee.dao.web.reqeust.WxPhoneRequest; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | | import com.doumee.service.business.UsersService; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.interfaces.MPJBaseJoin; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import okhttp3.Response; |
| | | import org.apache.catalina.User; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.InputStream; |
| | | import java.util.*; |
| | | import java.util.concurrent.Callable; |
| | |
| | | |
| | | @Override |
| | | public String getContentShareImg(Users users, ContentShareImgDto param){ |
| | | users = usersMapper.selectById(users.getId()); |
| | | this.getUsersDetail(users); |
| | | if(StringUtils.isBlank(param.getImgurl())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | if(img1 ==null){ |
| | | return param.getImgurl(); |
| | | } |
| | | /* if(img1.getWidth() <200 && img1.getHeight()<100){ |
| | | /* if(img1.getWidth() <200 && img1.getHeight()<100){ |
| | | return param.getImgurl(); |
| | | } |
| | | */ |
| | | }*/ |
| | | String defualtHeader = systemDictDataBiz.queryByCode(Constants.WEIXIN_DEFAULT_IMGS, Constants.USER_CARD_HEADER_IMG).getCode(); |
| | | String imgurl =StringUtils.isNotBlank(users.getImgurl())?path+(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.USERS_FILE).getCode())+users.getImgurl():defualtHeader; |
| | | String url =null; |
| | | //å
容å享海æ¥å¾ç |
| | | InputStream mpCode = Constants.generateWxMiniImgStream(systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(), |
| | | //"userId="+users.getId()+"&articleId="+param.getArticleId(), |
| | | param.getArticleId()+"&"+users.getId(), |
| | | param.getArticleId()+"_"+users.getId(), |
| | | param.getPageUrl());//å°ç¨åº |
| | | |
| | | InputStream inputStream = GeneratePicUtil.generateShareWithUserImg( |
| | |
| | | url = path+fileName; |
| | | } |
| | | return url; |
| | | |
| | | } |
| | | |
| | | private String dealShareImgNoUser(ContentShareImgDto param, Users users, String shareFolder, String path) { |
| | | String url =null; |
| | | //å
容å享海æ¥å¾ç |
| | | InputStream mpCode = Constants.generateWxMiniImgStream(systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(), |
| | | "userId="+users.getId()+"&articleId="+param.getArticleId(), |
| | | param.getArticleId()+"_"+users.getId(), |
| | | param.getPageUrl());//å°ç¨åº |
| | | |
| | | String title = systemDictDataBiz.queryByCode(Constants.WEIXIN_DEFAULT_IMGS, Constants.SHARE_HAIBAO_HEADER_TITLE).getCode(); |
| | |
| | | |
| | | @Override |
| | | public String getUserCard(Users users){ |
| | | users = usersMapper.selectById(users.getId()); |
| | | this.getUsersDetail(users); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode(); |
| | | String folder = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.USERS_FILE).getCode(); |
| | | if(StringUtils.isNotBlank(users.getCardImg()) && !StringUtils.equals(users.getCardImg(),"-")){ |
| | |
| | | Shop shop = shopMapper.selectById(users.getDepartmentId()); |
| | | if(Objects.nonNull(shop)){ |
| | | users.setShopName(shop.getName()); |
| | | users.setShopCity(shop.getProvinceName()+shop.getCityName()+shop.getAreaName()); |
| | | if(!(StringUtils.isBlank(shop.getProvinceName())||StringUtils.isBlank(shop.getCityName())||StringUtils.isBlank(shop.getAreaName()))){ |
| | | users.setShopCity(shop.getProvinceName()+shop.getCityName()+shop.getAreaName()); |
| | | } |
| | | if(StringUtils.isNotBlank(shop.getAddress())){ |
| | | users.setShopAddress(shop.getAddress()); |
| | | }else{ |
| | |
| | | //TODO è°èµ· ä¸å°æ¥å£ |
| | | usersMapper.update(new UpdateWrapper<Users>() |
| | | .lambda() |
| | | .set(Users::getCardImg,"-") //éç½®åç为 - |
| | | .set(Users::getCardImg,null) //éç½®åç为 - |
| | | .set(StringUtils.isNotBlank(editUsersRequest.getImgurl()),Users::getImgurl,editUsersRequest.getImgurl()) |
| | | .set(StringUtils.isNotBlank(editUsersRequest.getName()),Users::getName,editUsersRequest.getName()) |
| | | .set(StringUtils.isNotBlank(editUsersRequest.getPhone()),Users::getPhone,editUsersRequest.getPhone()) |
| | |
| | | return ztBaseRequst; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public InputStream getQrCode(GenerateQRCodeRequest generateQRCodeRequest){ |
| | | if(Objects.isNull(generateQRCodeRequest) |
| | | ||StringUtils.isBlank(generateQRCodeRequest.getIamId()) |
| | | || StringUtils.isBlank(generateQRCodeRequest.getBusinessId()) |
| | | || Objects.isNull(generateQRCodeRequest.getBusinessType())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(generateQRCodeRequest.getBusinessType()<Constants.ZERO || generateQRCodeRequest.getBusinessType() > Constants.THREE){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç±»åé误"); |
| | | } |
| | | Users users = usersMapper.selectOne(new QueryWrapper<Users>().lambda().eq(Users::getIamId, |
| | | generateQRCodeRequest.getIamId()).last("limit 1")); |
| | | if(Objects.isNull(users)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å工信æ¯"); |
| | | } |
| | | InputStream inputStream = Constants.generateWxMiniImgStream( |
| | | systemDictDataBiz.queryByCode(Constants.WX_MINI_CONFIG, Constants.WX_TOKEN_CUSTOMER).getCode(), |
| | | generateQRCodeRequest.getBusinessId()+"_"+generateQRCodeRequest.getBusinessType()+"_"+users.getId(), |
| | | null);//å°ç¨åº |
| | | return inputStream; |
| | | // try { |
| | | // ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | // byte[] buffer = new byte[1024]; |
| | | // int len = -1; |
| | | // while ((len = inputStream.read(buffer)) != -1) { |
| | | // baos.write(buffer, 0, len); |
| | | // } |
| | | // return "data:mediatype;base64," + Base64.getEncoder().encodeToString(baos.toByteArray()); |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"äºç»´ç çæå¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | |
| | | private ActionsService actionsService; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "客æ·ç«¯å°ç¨åºç»é", notes = "客æ·ç«¯å°ç¨åº") |
| | | @GetMapping("/wxLoginCustomer") |
| | | @ApiImplicitParams({ |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "salesId", value = "导è´ä¸»é®ï¼äºç»´ç å享ï¼", required = false), |
| | | }) |
| | | public ApiResponse<ZTCaseInfoResponse> getWholecaseInfo(@RequestParam String id) { |
| | | ZTCaseInfoResponse ztCaseInfoResponse= getZhongTaiDataService.getWholecaseInfo(id,getUserType(),getMemberId()); |
| | | public ApiResponse<ZTCaseInfoResponse> getWholecaseInfo(@RequestParam String id,String salesId) { |
| | | ZTCaseInfoResponse ztCaseInfoResponse= getZhongTaiDataService.getWholecaseInfo(id,getUserType(),getMemberId(),salesId); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztCaseInfoResponse); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "salesId", value = "导è´ä¸»é®ï¼äºç»´ç å享ï¼", required = false), |
| | | }) |
| | | public ApiResponse<ZTProductNewsInfoResponse> getProductNewsInfo(@RequestParam String id) { |
| | | ZTProductNewsInfoResponse ztProductNewsInfoResponse= getZhongTaiDataService.getProductNewsInfo(id,getUserType(),getMemberId()); |
| | | public ApiResponse<ZTProductNewsInfoResponse> getProductNewsInfo(@RequestParam String id,String salesId) { |
| | | ZTProductNewsInfoResponse ztProductNewsInfoResponse= getZhongTaiDataService.getProductNewsInfo(id,getUserType(),getMemberId(),salesId); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztProductNewsInfoResponse); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "salesId", value = "导è´ä¸»é®ï¼äºç»´ç å享ï¼", required = false), |
| | | }) |
| | | public ApiResponse<ZTRealcaseInfoResponse> getRealcaseInfo(@RequestParam String id) { |
| | | ZTRealcaseInfoResponse ztRealcaseInfoResponse= getZhongTaiDataService.getRealcaseInfo(id,getUserType(),getMemberId()); |
| | | public ApiResponse<ZTRealcaseInfoResponse> getRealcaseInfo(@RequestParam String id,String salesId) { |
| | | ZTRealcaseInfoResponse ztRealcaseInfoResponse= getZhongTaiDataService.getRealcaseInfo(id,getUserType(),getMemberId(),salesId); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztRealcaseInfoResponse); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "id", value = "å
容主é®", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "salesId", value = "导è´ä¸»é®ï¼äºç»´ç å享ï¼", required = false), |
| | | }) |
| | | public ApiResponse<ZTProductInfoResponse> getProductInfo(@RequestParam String id) { |
| | | ZTProductInfoResponse ztProductInfoResponse= getZhongTaiDataService.getProductInfo(id,getUserType(),getMemberId()); |
| | | public ApiResponse<ZTProductInfoResponse> getProductInfo(@RequestParam String id,String salesId) { |
| | | ZTProductInfoResponse ztProductInfoResponse= getZhongTaiDataService.getProductInfo(id,getUserType(),getMemberId(),salesId); |
| | | return ApiResponse.success("æ¥è¯¢æå",ztProductInfoResponse); |
| | | } |
| | | |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import com.amazonaws.util.Md5Utils; |
| | | import com.doumee.biz.system.SystemDataPermissionBiz; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.zbom.ZbomCRMService; |
| | | import com.doumee.biz.zbom.ZbomZhongTaiService; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.config.annotation.UserLoginRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.News; |
| | | import com.doumee.dao.web.reqeust.GenerateQRCodeRequest; |
| | | import com.doumee.dao.web.response.DailyUpdatesResponse; |
| | | import com.doumee.dao.web.response.ZSZXCatalogResponse; |
| | | import com.doumee.service.business.GetZhongTaiDataService; |
| | | import com.doumee.service.business.NewsService; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.UsersService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.codec.digest.DigestUtils; |
| | | import org.apache.commons.codec.digest.Md5Crypt; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.tomcat.util.security.MD5Encoder; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @Autowired |
| | | public GetZhongTaiDataService getZhongTaiDataService; |
| | | |
| | | @Autowired |
| | | public UsersService usersService; |
| | | |
| | | @Autowired |
| | | public SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | |
| | | public ApiResponse<ZSZXCatalogResponse> getZSZXCatalogs() { |
| | | return ApiResponse.success(getZhongTaiDataService.getZSZXCatalogs(getMemberId(),getUserType())); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<PageData<News>> newsPage (@RequestBody PageWrap<News> pageWrap) { |
| | | pageWrap.getModel().setIsPublish(Constants.ONE); |
| | | return ApiResponse.success(newsService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | public ApiResponse<String> getCrmAuthUrl(@RequestParam Integer type) { |
| | | return ApiResponse.success(zbomCRMService.getCrmGoUrl(this.getLoginUserInfo().getIamUsername(),type)); |
| | | } |
| | | |
| | | @PreventRepeat(lockTime = 2000) |
| | | @ApiOperation(value = "çæå°ç¨åºç ", notes = "PAD端") |
| | | @PostMapping("/getQrCode") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "sign", value = "ç¾åï¼ä½¿ç¨timestamp+appkeyè¿è¡md5å å¯ï¼", required = true), |
| | | @ApiImplicitParam(paramType = "header", dataType = "Long", name = "timestamp", value = "æ¶é´æ³ï¼å½åæ¶é´æ¯«ç§ï¼2å°æ¶å
ææï¼", required = true), |
| | | }) |
| | | public void getQrCode(@RequestParam(value = "sign")String sign, |
| | | @RequestParam(value = "timestamp")Long timestamp, |
| | | @RequestBody GenerateQRCodeRequest generateQRCodeRequest,HttpServletResponse response) { |
| | | if(StringUtils.isBlank(sign) || timestamp == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | String interfaceKey = systemDictDataBiz.queryByCode(Constants.ZBOM,Constants.ZBOM_PAD_INTERFACE_KEY).getCode(); |
| | | //夿æ¶é´æ³æ¯å¦è¶
è¿ä¸¤å°æ¶ |
| | | if(System.currentTimeMillis()-timestamp > 2 * 60 * 3600 * 1000){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"token已失æ!"); |
| | | } |
| | | String token = DigestUtils.md5Hex(timestamp+interfaceKey); |
| | | if(!token.equals(sign)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"token已失æ!"); |
| | | } |
| | | try{ |
| | | response.setHeader("Cache-Control", "no-store, no-cache"); |
| | | response.setContentType("image/jpeg"); |
| | | InputStream inputStream = usersService.getQrCode(generateQRCodeRequest); |
| | | ImageIO.write(ImageIO.read(inputStream),"png",response.getOutputStream()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.business.model.Shop; |
| | | import com.doumee.dao.business.model.SmsEmail; |
| | | import com.doumee.dao.business.model.Users; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | import com.doumee.dao.web.response.AccountResponse; |
| | | import com.doumee.service.business.*; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @LoginRequired |
| | | @ApiOperation(value = "æ´æ°token", notes = "å工端å°ç¨åº") |
| | | @GetMapping("/updateToken") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse updateToken () { |
| | | systemDictDataBiz.updWxMiniToken(); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @UserLoginRequired |
| | | @ApiOperation(value = "è·åå
容å享海æ¥", notes = "è·åå
容å享海æ¥ï¼å å°ç¨åºç ") |
| | |
| | | var that = this |
| | | const { userInfo } = this.data |
| | | if (e.detail.avatarUrl) { |
| | | console.log(e) |
| | | wx.uploadFile({ |
| | | url: uploadUrl, |
| | | filePath: e.detail.avatarUrl, |