Merge branch '20221008' into huacheng_test
| | |
| | | Map map=umfPayUtil.pay(orderid, DateUtils.getCurrentDateString(),openid,amount); |
| | | return R.ok(map); |
| | | } |
| | | @ApiOperation("无水洗车下单接口") |
| | | @GetMapping("/wsPay") |
| | | public R wsPay(@RequestParam("orderid") String orderid,@RequestParam("openid")String openid,@RequestParam("amount")String amount){ |
| | | Map map=umfPayUtil.pay2(orderid, DateUtils.getCurrentDateString(),openid,amount); |
| | | return R.ok(map); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | @ApiOperation("ws洗车推送") |
| | | @PostMapping("/wsPush") |
| | | public R wsPush(@RequestBody String aesString){ |
| | | try { |
| | | Map<String, String> aesMap= (Map<String, String>) JSON.parse(aesString); |
| | | String desString=MyAESUtil.Decrypt(aesMap.get("aesString"),"Ryo7M3n8loC5Abcd"); |
| | | Map<String,String> desMap= (Map) JSON.parse(desString); |
| | | return userService.wsPush(desMap.get("washer_mobile"),desMap.get("phone"),desMap.get("washer_name"),Integer.parseInt(desMap.get("order_status"))); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return R.fail("推送失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 电动车商城商品购买支付回调 |
| | |
| | | Map respMap = instance.miniProgramPayMap(reqMapPublic); |
| | | return respMap; |
| | | } |
| | | public Map pay2(String orderid,String merdate,String openid,String amount){ |
| | | Map reqMapPublic = preparePublic2(orderid,merdate,openid,amount,notifyUrl); |
| | | UmfService instance = new UmfServiceImpl("53461",file); |
| | | Map respMap = instance.miniProgramPayMap(reqMapPublic); |
| | | return respMap; |
| | | } |
| | | public Map repay(String orderid,String merdate,String refundNo,String refundAmount,String orgAmount){ |
| | | Map reqMapPublic=prepareRepay(orderid,merdate,refundNo,refundAmount,orgAmount); |
| | | UmfService instance = new UmfServiceImpl("53461",file); |
| | |
| | | return reqMap; |
| | | } |
| | | //小程序支付请求参数 |
| | | public static Map preparePublic2(String orderid,String merdate,String openid,String amount,String notifyUrl) { |
| | | Map reqMap = new HashMap(); |
| | | reqMap.put("mer_id","53461"); |
| | | reqMap.put("notify_url",notifyUrl); |
| | | reqMap.put("goods_inf","无水洗车服务"); |
| | | reqMap.put("order_id",orderid); |
| | | reqMap.put("mer_date",merdate); |
| | | reqMap.put("amount",amount); |
| | | reqMap.put("app_id","wx98d62711dfbd8425"); |
| | | reqMap.put("open_id",openid); |
| | | reqMap.put("scancode_type","WECHAT"); |
| | | return reqMap; |
| | | } |
| | | //小程序支付请求参数 |
| | | public static Map prepareRepay(String orderid,String merdate,String refundNo,String refundAmount,String orgAmount) { |
| | | Map reqMap = new HashMap(); |
| | | reqMap.put("mer_id","53461"); |
| | |
| | | */ |
| | | @GetMapping("/uuPush") |
| | | R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 无水洗车推送 |
| | | * @param washPhone |
| | | * @param phone |
| | | * @param washName |
| | | * @param orderStatus |
| | | * @return |
| | | */ |
| | | @GetMapping("/wsPush") |
| | | R wsPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | @GetMapping("/communityList") |
| | | R communityList(@RequestParam("name") String name, @RequestParam("id") Long id); |
| | | |
| | |
| | | } |
| | | return accessToken; |
| | | } |
| | | |
| | | public String getWsAccessToken() throws Exception { |
| | | String accessToken = "0"; |
| | | try { |
| | | log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + APP_ID + "&secret=" + APP_SECRET; |
| | | String result = HttpClientUtil.httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | | accessToken = resultMap.get("access_token").toString(); |
| | | } |
| | | } catch (IOException ioe) { |
| | | log.error("小程序http请求异常"); |
| | | ioe.printStackTrace(); |
| | | } |
| | | return accessToken; |
| | | } |
| | | /** |
| | | * 获取西区社区通微信token |
| | | * @return 西区社区通微信token |
| | |
| | | @PostMapping("/page") |
| | | public R queryByPage(@RequestBody PageComPbCheckUnitDto comPbCheckUnit) { |
| | | //comPbCheckUnit.setCommunityId(this.getCommunityId()); |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | comPbCheckUnit.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | public R unitStatisticsTop(@RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "belongTo", required = false) String choice) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | |
| | | @ApiOperation(value = "报到单位统计", response = PbCheckUnitStatisticsVo.class) |
| | | @PostMapping("/statistics") |
| | | public R unitStatistics(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @RequestParam(value = "choice", required = false) String choice, |
| | | @RequestParam(value = "checkUnitId", required = false) Long checkUnitId) { |
| | | String belongTo = ""; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | belongTo = this.getLoginUserInfo().getName(); |
| | | } |
| | |
| | | @ApiOperation(value = "报到党员统计-按单位归属统计", response = PbCheckUnitStatisticsVo.class) |
| | | @PostMapping("/pbStatistics/belong") |
| | | public R pbStatisticsBelong(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @ApiOperation(value = "报到党员统计-按单位统计", response = ComPbCheckUnitVo.class) |
| | | @PostMapping("/pbStatistics/unit") |
| | | public R pbStatisticsUnit(@RequestBody PagePbCheckUnitCommonDto commonDto) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | commonDto.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | | public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | partyBuildingMemberVO.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | @PostMapping("pagepartyorganization") |
| | | public R pagePartyOrganization(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO) { |
| | | //pagePartyOrganizationVO.setCommunityId(this.getCommunityId()); |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区"}; |
| | | String[] area={"东区","仁和区","米易县","盐边县","西区","钒钛高新区"}; |
| | | if(ArrayUtil.contains(area,this.getLoginUserInfo().getName())){ |
| | | pagePartyOrganizationVO.setBelongTo(this.getLoginUserInfo().getName()); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.vos.MenuVO; |
| | |
| | | **/ |
| | | @RestController |
| | | @RequestMapping("/role/") |
| | | public class RoleApi { |
| | | public class RoleApi extends BaseController { |
| | | @Resource |
| | | private RoleService roleService; |
| | | |
| | |
| | | */ |
| | | @PostMapping("listmenubackstage") |
| | | public R listMenuBackstage(@RequestParam("communityId") Long communityId) { |
| | | return roleService.listMenuBackstage(communityId); |
| | | return roleService.listMenuBackstage(communityId,this.getAppId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | return userService.uuPush(washPhone,phone,washName,orderStatus); |
| | | } |
| | | |
| | | /** |
| | | * 无水洗车推送 |
| | | * @param washPhone |
| | | * @param phone |
| | | * @param washName |
| | | * @param orderStatus |
| | | * @return |
| | | */ |
| | | @GetMapping("/wsPush") |
| | | public R wsPush(@RequestParam(value = "washPhone",required = false)String washPhone,@RequestParam("phone")String phone,@RequestParam(value = "washName",required = false)String washName,@RequestParam("orderStatus")Integer orderStatus){ |
| | | return userService.wsPush(washPhone,phone,washName,orderStatus); |
| | | } |
| | | |
| | | @GetMapping("/indexData/getAreaAndStreet") |
| | | public R getAreaAndStreet(){ |
| | | return userService.getAreaAndStreet(); |
| | |
| | | * 社区id 0 运营平台 |
| | | * @return 菜单集合 |
| | | */ |
| | | R listMenuBackstage(Long communityId); |
| | | R listMenuBackstage(Long communityId,String appId); |
| | | |
| | | /** |
| | | * 设置角色的权限 |
| | |
| | | R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 无水洗车通知推送 |
| | | * @param phone |
| | | * @param orderStatus |
| | | * @return |
| | | */ |
| | | R wsPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | /** |
| | | * 获取城镇或村落列表 |
| | | * */ |
| | | R getCommunityList(String name,Long id); |
| | |
| | | * @return 菜单集合 |
| | | */ |
| | | @Override |
| | | public R listMenuBackstage(Long communityId) { |
| | | public R listMenuBackstage(Long communityId,String appId) { |
| | | if("wx118de8a734d269f0".equals(appId)){ |
| | | communityId=2L; |
| | | } |
| | | else { |
| | | communityId=1552661941170868228L; |
| | | } |
| | | List<SysMenuVO> sysMenuVOS = new ArrayList<>(); |
| | | List<SysMenuDO> sysMenuDOS = |
| | | sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getParentId, 0) |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R wsPush(String washPhone,String phone,String washName,Integer orderStatus) { |
| | | if(StringUtils.isNotEmpty(phone)){ |
| | | SysUserDO sysUserDO=userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone,phone).eq(SysUserDO::getAppId,"wx98d62711dfbd8425").orderByDesc(SysUserDO::getCreateAt).last("limit 1")); |
| | | if(sysUserDO!=null&&StringUtils.isNotEmpty(sysUserDO.getOpenid())){ |
| | | String status=""; |
| | | String accessToken=""; |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | try { |
| | | accessToken = util.getWsAccessToken(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | switch (orderStatus){ |
| | | case 3 : status="已分配车美"; |
| | | WxUtil.sendUuWash3(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"sU18zbyzxFldHAdOREaQCR5uq_uMvCKTmGtklO1xw-w"); |
| | | break; |
| | | case 4 : status="车美已开始服务"; |
| | | WxUtil.sendUuWash4(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"Eft5ksvsnOQANy2uNOGY43CC3pb33eDGA_lgCEoxuiw"); |
| | | break; |
| | | case 6 : status="订单确认完成"; |
| | | WxUtil.sendUuWash6(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"k1aV97H3pDNNcNcDTeZBD9jQemNDADnRE801HhTXweI"); |
| | | break; |
| | | case 9 : status="订单已取消"; |
| | | WxUtil.sendUuWash(sysUserDO.getOpenid(),accessToken,status,washName,washPhone,phone,"9_2FhQPDxZoUqmAuIZ1L1zjjYXokdNvu7A0gzKfvruI"); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | @Override |
| | | public R getCommunityList(String name,Long id) { |
| | | //区级账号名 |