| | |
| | | package com.dsh.account.controller; |
| | | |
| | | import com.alibaba.nacos.common.utils.Md5Utils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.account.dto.SelectDto; |
| | |
| | | return 5001; |
| | | } |
| | | } |
| | | |
| | | query.setIsVip(0); |
| | | query.setPassword("111111"); |
| | | query.setInsertTime(new Date()); |
| | | return appUserService.saveOrUpdate(query); |
| | | } |
| | |
| | | |
| | | } |
| | | classInfoVo.setCourseList(courseList); |
| | | List<ExerciseVideo> stuCourseOfVideoList = voclClient.getStuCourseOfVideoList(coursePackIds); |
| | | System.out.println(stuCourseOfVideoList); |
| | | classInfoVo.setExerciseVideoList(stuCourseOfVideoList); |
| | | // List<ExerciseVideo> stuCourseOfVideoList = voclClient.getStuCourseOfVideoList(coursePackIds); |
| | | List<ExerciseVideo> query = voclClient.query(id); |
| | | System.out.println("======queryqueryqueryquery=================="+query); |
| | | classInfoVo.setExerciseVideoList(query); |
| | | }else { |
| | | classInfoVo.setIsThere(2); |
| | | List<TImgConfig> tImgConfigs = configClient.getNoneStuImgs(); |
| | |
| | | String fieldValue = record.getPurchaseAmount(); |
| | | if (ToolUtil.isNotEmpty(timeRequest.getType())){ |
| | | switch (timeRequest.getType()){ |
| | | case 1: |
| | | return fieldValue != null && !fieldValue.isEmpty() && fieldValue.charAt(0) == '-'; |
| | | case 2: |
| | | return fieldValue != null && !fieldValue.isEmpty() && fieldValue.charAt(0) == '-'; |
| | | case 1: |
| | | return fieldValue != null && !fieldValue.isEmpty() && fieldValue.charAt(0) == '+'; |
| | | default: |
| | | return fieldValue != null && !fieldValue.isEmpty(); |
| | | break; |
| | | } |
| | | } |
| | | return false; |
| | | return true; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | |
| | | collect.add(-1); |
| | | } |
| | | if(collect.contains(ofSearch.getStoreId())){ |
| | | if(collect.size()>1){ |
| | | map.put("size",1); |
| | | }else { |
| | | map.put("size",0); |
| | | } |
| | | mapList.add(map); |
| | | } |
| | | } |
| | |
| | | Object endTime = stringObjectMap.get("endTime"); |
| | | stringObjectMap.put("timeValue",startTime + "至"+endTime); |
| | | Integer publisherType = (Integer) stringObjectMap.get("publisherType"); |
| | | if (publisherType!=null) { |
| | | if ( publisherType == 1) { |
| | | Integer cityManagerId = (Integer) stringObjectMap.get("cityManagerId"); |
| | | TCityManager byId = citClient.getById(cityManagerId); |
| | | stringObjectMap.put("province", byId.getProvince()); |
| | | |
| | | stringObjectMap.put("city", byId.getCity()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | coupon.setPublisherType(1); |
| | | coupon.setCityManagerId(dataVo.getCityManagerId()); |
| | | } |
| | | if(dataVo.getObjType()!=1){ |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | if (dataVo.getUserType()==1){ |
| | | coupon.setAuditStatus(2); |
| | | }else{ |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | boolean save = couponService.save(coupon); |
| | | if (save){ |
| | | if (dataVo.getCompany() == 3){ |
| | |
| | | result.add(map); |
| | | } |
| | | } |
| | | }else if(ofSearch.getObjType()==2){ |
| | | for (Map<String, Object> map : result1) { |
| | | // 拿到当前运营商下的门店的门票 |
| | | List<PointsMerchandiseStore> id = pmdstoService.list(new QueryWrapper<PointsMerchandiseStore>().in("storeId",ofSearch.getStoreIds())); |
| | | // 拿到积分商品id集合 |
| | | List<Integer> collect = id.stream().map(PointsMerchandiseStore::getPointsMerchandiseId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | Integer temp =(Integer)map.get("id"); |
| | | if (collect.contains(temp)){ |
| | | if(id.size()>1){ |
| | | map.put("size",1); |
| | | }else { |
| | | map.put("size",0); |
| | | } |
| | | result.add(map); |
| | | } |
| | | } |
| | | }else { |
| | | result=result1; |
| | | } |
| | |
| | | private Page<Map<String, Object>> page; |
| | | private String cityCode; |
| | | private Integer storeId; |
| | | private Integer operatorId; |
| | | |
| | | |
| | | private Integer objType; |
| | | } |
| | |
| | | @Param("state")Integer state, |
| | | @Param("page")Page<Map<String, Object>> page, |
| | | @Param("cityCode") String cityCode, |
| | | @Param("storeId")Integer storeId |
| | | |
| | | @Param("storeId")Integer storeId, |
| | | @Param("operatorId")Integer operatorId, |
| | | @Param("objType")Integer objType |
| | | ); |
| | | |
| | | List<Map<String, Object>> queryCouponListOfSearch1(@Param("name")String name, |
| | |
| | | * 门店列表 |
| | | */ |
| | | String storeIds; |
| | | |
| | | Integer objType; |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | |
| | | private Integer objType; |
| | | |
| | | private Integer objId; |
| | | private List<Integer> storeIds; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryCouponListOfSearch(CouponListOfSearch ofSearch) { |
| | | return this.baseMapper.queryCouponListOfSearch(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(),ofSearch.getStoreId()); |
| | | return this.baseMapper.queryCouponListOfSearch(ofSearch.getName(), |
| | | ofSearch.getType(),ofSearch.getDistributionMethod(), |
| | | ofSearch.getUserPopulation(),ofSearch.getStatus(), |
| | | ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(), |
| | | ofSearch.getStoreId(),ofSearch.getObjType(),ofSearch.getOperatorId()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | pickUpQuantity, |
| | | `status`, |
| | | state, |
| | | illustrate |
| | | illustrate, |
| | | auditStatus |
| | | from t_coupon |
| | | where 1 = 1 |
| | | <if test="operatorId != null"> |
| | | and cityManagerId = #{operatorId} |
| | | </if> |
| | | <if test="objType == 1"> |
| | | and auditStatus =2 |
| | | </if> |
| | | <if test="cityCode != null"> |
| | | and id in( |
| | | SELECT DISTINCT couponId FROM |
| | |
| | | <if test="state != null"> |
| | | and `state` = #{state} |
| | | </if> |
| | | |
| | | order by insertTime desc |
| | | </select> |
| | | <select id="queryCouponListOfSearch1" resultType="java.util.Map"> |
| | |
| | | `sort`, |
| | | shelves |
| | | from t_points_merchandise |
| | | where 1 = 1 |
| | | where status =1 |
| | | <if test="query.name != null"> |
| | | and `name` like concat('%', #{query.name}, '%') |
| | | </if> |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<RegisterOrderVO> res = packagePaymentService.listAllRegister(query); |
| | | // 该运营商下没有门店 |
| | | if (query.getStoresIds()!=null){ |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil<List<AppUserVideoResponse>> queryAfterSourceList( CourseOfAfterRequest search){ |
| | | public ResultUtil<List<AppUserVideoResponse>> queryAfterSourceList( CourseOfAfterRequest search) throws Exception { |
| | | // try { |
| | | // Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | // |
| | | // if(null == appUserId){ |
| | | // return ResultUtil.tokenErr(); |
| | | // } |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | // |
| | | // List<Integer> courseIds = new ArrayList<>(); |
| | | // QueryWrapper<TCoursePackagePayment> queryWrapper = new QueryWrapper<TCoursePackagePayment>().eq("appUserId", appUserId) |
| | |
| | | // } |
| | | |
| | | |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", 19); |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", appUserId); |
| | | if (ToolUtil.isNotEmpty(search.getCourseTypeId())){ |
| | | queryWrapper1.eq("coursePackageId",search.getCourseTypeId()); |
| | | } |
| | |
| | | |
| | | System.out.println("保存成功=============》="+holi); |
| | | |
| | | |
| | | |
| | | TCoursePackage tCoursePackage = packageService.getById(toHoliDto.getClassId()); |
| | | String classWeeks = tCoursePackage.getClassWeeks(); |
| | | List<Integer> week = week(classWeeks); |
| | |
| | | String join = StringUtils.join(stringArray, ","); |
| | | System.out.println("==========join========"+join); |
| | | return "转课成功"; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import com.dsh.course.service.PostCourseVideoService; |
| | | import com.dsh.course.service.TCoursePackageDiscountService; |
| | | import com.dsh.course.util.ResultUtil; |
| | | import com.dsh.course.util.TokenUtil; |
| | | import com.dsh.course.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | @Autowired |
| | | private CoursePackageStudentService coursePackageStudentService; |
| | | @Autowired |
| | | private TokenUtil tokenUtil; |
| | | @ResponseBody |
| | | @PostMapping("/base/courseVideo/query") |
| | | public List<ExerciseVideo> query(@RequestBody Integer coursePackIds){ |
| | | public List<ExerciseVideo> query(@RequestBody Integer id) throws Exception { |
| | | |
| | | List<ExerciseVideo> exerciseVideoList = new ArrayList<>(); |
| | | |
| | | // Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | |
| | | |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", 19); |
| | | |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", id); |
| | | List<CoursePackageStudent> list = coursePackageStudentService.list(queryWrapper1); |
| | | List<Long> longs = new ArrayList<>(); |
| | | for (CoursePackageStudent coursePackageStudent : list) { |
| | |
| | | import com.dsh.course.model.vo.RegisterCourseVo; |
| | | import com.dsh.course.model.vo.request.*; |
| | | import com.dsh.course.model.vo.response.*; |
| | | import com.dsh.course.service.CoursePackageSchedulingService; |
| | | import com.dsh.course.service.ICoursePackageSchedulingService; |
| | | import com.dsh.course.service.TCoursePackagePaymentService; |
| | | import com.dsh.course.util.*; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<RecordAppoint> obtainStuClassDetails(Integer stuId, Integer appUserId,Integer pageNum) { |
| | | |
| | |
| | | if (tCoursePackagePayments.size() > 0 ){ |
| | | |
| | | // int pageNum = 1; // 页码 |
| | | int pageSize = 10; // 每页记录数 |
| | | Page<CoursePackageStudent> page = new Page<>(pageNum, pageSize); |
| | | int pageSize = 5; // 每页记录数 |
| | | Page<CoursePackageStudent> page = new Page<>(1, pageSize); |
| | | |
| | | // for (TCoursePackagePayment tCoursePackagePayment : tCoursePackagePayments) { |
| | | // List<CoursePackageStudent> coursePackageStudent1 = cpsMapper.selectList(new QueryWrapper<CoursePackageStudent>() |
| | |
| | | // recordVo.setCourseHours(tCoursePackagePayment.getClassHours()); |
| | | Date date = DateUtil.getDate(); |
| | | |
| | | String classStartTime = coursePackage.getClassStartTime(); |
| | | String classEndTime = coursePackage.getClassEndTime(); |
| | | recordVo.setTimeFrame(simpleDateFormat.format(date)+" "+classStartTime+"-"+classEndTime); |
| | | |
| | | CoursePackageScheduling byId = coursePackageSchedulingService.getById(coursePackageStudent.getCoursePackageSchedulingId()); |
| | | // String classStartTime = coursePackage.getClassStartTime(); |
| | | // String classEndTime = coursePackage.getClassEndTime(); |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String dateString1 = sdf.format(byId.getClassDate()); |
| | | String dateString2 = sdf.format(byId.getEndDate()); |
| | | |
| | | |
| | | recordVo.setTimeFrame(dateString1 + "-" + dateString2.substring(11)); |
| | | |
| | | // recordVo.setTimeFrame(simpleDateFormat.format(date)+" "+classStartTime+"-"+classEndTime); |
| | | Store store = stoClient.queryStoreById(coursePackage.getStoreId()); |
| | | recordVo.setStoreNameAddr(store.getName()+store.getAddress()); |
| | | recordVo.setCourseStuRecordId(coursePackageStudent.getId()); |
| | |
| | | List<String> integerList = Arrays.asList(split); |
| | | String weekOfDate = DateTimeHelper.getWeekOfDate(new Date()); |
| | | if (integerList.contains(weekOfDate)){ |
| | | String dat = simpleDateFormat.format(date) +" "+ classStartTime; |
| | | String dat = simpleDateFormat.format(date) +" "+ dateString2.substring(11); |
| | | |
| | | Date start = null; |
| | | try { |
| | |
| | | </select> |
| | | <select id="queryAll" resultType="com.dsh.course.model.vo.response.AppUserVideoResponse"> |
| | | |
| | | SELECT cs.courseId as videoId,cs.coursePackageId as coursePackageId,tc.coverDrawing,tc.name as videoName,tc.introduce as synopsis,cs.integral,cs.courseVideo as courseVideo |
| | | SELECT cs.courseId as videoId,cs.coursePackageId as coursePackageId,tc.coverDrawing,tc.name as videoName,tc.introduce as synopsis,cs.integral,tc.courseVideo as courseVideo |
| | | FROM t_course_package_scheduling cs |
| | | LEFT JOIN t_course tc ON cs.courseId = tc.id |
| | | WHERE cs.courseId IS NOT NULL and cs.id in |
| | |
| | | <artifactId>font-asian</artifactId> |
| | | <version>7.1.13</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alipay.sdk</groupId> |
| | | <artifactId>alipay-sdk-java</artifactId> |
| | | <version>4.38.10.ALL</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | private Page<Map<String, Object>> page; |
| | | private String cityCode; |
| | | private Integer storeId; |
| | | private Integer operatorId; |
| | | private Integer objType; |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | |
| | | private Integer objType; |
| | | |
| | | private Integer objId; |
| | | private List<Integer> storeIds; |
| | | } |
| | |
| | | /** |
| | | * 获取ztree的节点列表 |
| | | */ |
| | | List<ZTreeNode> tree(); |
| | | List<ZTreeNode> tree(@Param("type") Integer type, @Param("id") Integer id); |
| | | |
| | | List<Map<String, Object>> list(@Param("condition") String condition, @Param("objectType") Integer objectType, @Param("objectId") Integer objectId); |
| | | |
| | | /** |
| | | * 获取所有部门列表 |
| | | */ |
| | | List<Map<String, Object>> list(@Param("condition") String condition); |
| | | // List<Map<String, Object>> list(@Param("condition") String condition); |
| | | |
| | | } |
| | |
| | | * @return |
| | | * @date 2017年2月12日 下午9:14:34 |
| | | */ |
| | | List<Map<String, Object>> selectRoles(@Param("condition") String condition); |
| | | |
| | | // List<Map<String, Object>> selectRoles(@Param("condition") String condition); |
| | | List<Map<String, Object>> selectRoles(@Param("condition") String condition, @Param("objectType") Integer objectType, @Param("objectId") Integer objectId); |
| | | /** |
| | | * 删除某个角色的所有权限 |
| | | * |
| | |
| | | * @return |
| | | * @date 2017年2月18日 上午10:32:04 |
| | | */ |
| | | List<ZTreeNode> roleTreeList(); |
| | | List<ZTreeNode> roleTreeList(@Param("type") Integer type, @Param("id") Integer id); |
| | | |
| | | /** |
| | | * 获取角色列表树 |
| | |
| | | * @return |
| | | * @date 2017年2月18日 上午10:32:04 |
| | | */ |
| | | List<ZTreeNode> roleTreeListByRoleId(String[] roleId); |
| | | List<ZTreeNode> roleTreeListByRoleId(@Param("array") String[] roleId, @Param("type") Integer type, @Param("id") Integer id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.course.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dsh.guns.modular.system.model.OperatorAuth; |
| | | import com.dsh.guns.modular.system.model.TTurn; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-09-19 |
| | | */ |
| | | public interface TOperatorAuthMapper extends BaseMapper<OperatorAuth> { |
| | | |
| | | } |
| | |
| | | */ |
| | | Integer getMenuNumByRole(@Param("roleStr") String roleStr); |
| | | |
| | | |
| | | |
| | | List<Map<String,Object>> getUserListPage(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("dataScope") DataScope dataScope, |
| | | @Param("name") String name, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("deptid") Integer deptid); |
| | | @Param("deptid") Integer deptid, |
| | | @Param("objectType") Integer objectType, |
| | | @Param("objectId") Integer objectId); |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.api; |
| | | |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.AlipayClient; |
| | | import com.alipay.api.DefaultAlipayClient; |
| | | import com.alipay.api.CertAlipayRequest; |
| | | import com.alipay.api.AlipayConfig; |
| | | import com.alipay.api.request.AntMerchantExpandIndirectImageUploadRequest; |
| | | import com.alipay.api.response.AntMerchantExpandIndirectImageUploadResponse; |
| | | import com.alipay.api.FileItem; |
| | | import java.util.Base64; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class AntMerchantExpandIndirectImageUpload { |
| | | |
| | | public static void main(String[] args) throws AlipayApiException { |
| | | String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCSsmylIHe0j0pRQrB9p5ljryk9Qg2Z/JgIh+gtZES1TDo35YVw24aRRt7pkY7oHIZqpMRmSsWND1t63LVuNlpq532LG0iEJVJS53GzpRoHDD3iD01GmUoNjkCL36NCrbY0hTDDw7GZnYuJ8194Sss7OEoi7Mghg/XUreX4awwpWngTepCF7zs0S4YJQWyGY4JI6ooGraW23siBVY5MUI9XXLL6UKIExUfKe7zRihs8SrTHNnXtDT6EKYYo8P6M90Xuk173QsK2Xguk1FQ5Blh2ts7UvZVjP+WoQwDvrnqruve5kzDD9gwnAYUvhY66mtlxeub9nf5LLTtCliXeUZpNAgMBAAECggEAaPShSM9e9d9jM5p8PZqw4yJKZhqhMqAHgmsCUZ+gjPn52U4s198oez5ydDgBP85Q2XIDVpB+oPrw34mTgUQAEuaG6wTdMDannMscjYQ9h/dZOyjph+5ajjJNugWKgEVazF7S0e1sXtTaJhvrHVyd5UPTvwMb+Oa59q1okQC91cNa2vJzXiC7dfqWXZW/otmmOpcIcCN8dVDG3YhAuc5ZiT78Ca8x9GHWfw7cw1FRewRZlp/YnD2fJeWEesfvGCV36zCksrJrZz5MFMdf1Qh6+tHxK+E5sPNGdbooviTRnNWrsgyS9NcXFSQItOZQHsbLVID/Bs0kxkYPzbsfX1vRXQKBgQDsBDNZxpmSZJZ/4HfCOfHytWAkH/GHE3GOYH4TdHKLXfxRCinU23OtdrU2Sy8tBZvaajDKkWvMkjWT2w+56+z+xTprTf2PL/LS9zWCc8LPKbif6NfnwaOE8pIBrvkBskGKwbIE2fFVT0B4hNsR80TbPxvvAfCKjUj67qrTXSal+wKBgQCfHiuq/gLuSD2fuplzCwu0Rm/wr56bUpxhq9WNGaPOybR6EPq/wTKp0ow+f9uSuTm2NZhi/TWTXHOizy9vcZChRpj03a7NYwUOw36zvW7SHuF0Uhsp8TrZTyCj1XdhdLyJ9JMyL2DTRpGtLUR01ZSrdXPax7/Xu+OHubijqRD2VwKBgFqCveKm7AwdMS43OhYtPKE0d3tDGNARX9IXJSJ23Nqfn3zApgwwYKtcQ+BfcucUKJHZeX6lyC56v7tFHkHRvWBy6JVwIlZAMCJBla7CkCn8OQZyOCJzuy7oC6BDptDEuKfq4kdEAW4S54mQgabfoT9nc2H0X3fy+NLqpm5KYeDzAoGAYerlIILUNuKJ2aOxDpS7jSLTfB/20MqTpZ9i+UPQBE8oGv4b8Kjpjowc9dEkxDPsCe8Nac08jQSVvJkXLdOLF1QkiHtrOMU4tY8kh2OJsRCD2Vs1kCf8+QGyql+Q6Y43AAZcFsQFJ78Dorh6qhNNO/45X2cQ7aeYK0vlDgHaiF0CgYA4k9Q1tc8sU67TgT9cmMM6hG7/Rf3cU3PIdYuojs1EIG+1BJ7TlEiNAHoPtphlGFFeDP3SVnf59RfYH+BbLiz1JX9p/KFKRRkoXtfd6bySVWHvj4x2WiVpKFvHxhxc3LRubx0ryLGR/tpUJzxp+9luanU/WgSRFKiEZJZqFjjDzw=="; |
| | | String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCzq4BIE4gMdEXxIAAUbiMpSytkzp+LVLVsBtji87rFGfWUcnrr3NKftaw0WtRu+36d1nDVOWW4CmgsOPyj1GOFoTcJOR/BqyIriwyLxpuMS8qgOqGJZXi+W4Nw2AJL6iMVwY2eI8F1G10gACK2I9TNJRzHh3tMTA6ItysbGoekRDtn6Xrkh5V6cyHQjLw0Q6MJK/68XT6/LWzarDEEYrSnIevOydMY32ptAgm5fp/h08M2khCmI6CuMWKmc87dPpd2krGVTALqprAQvB74AIqO+5DE0fN4LoitOYXAtWDCEF4kHN0hQUygIEGCwtMgEVzkf92VLlCX35YtDhWd1yQIDAQAB"; |
| | | AlipayConfig alipayConfig = new AlipayConfig(); |
| | | alipayConfig.setServerUrl("https://openapi.alipay.com/gateway.do"); |
| | | alipayConfig.setAppId("2021004123692417"); |
| | | alipayConfig.setPrivateKey(privateKey); |
| | | alipayConfig.setFormat("json"); |
| | | alipayConfig.setAlipayPublicKey(alipayPublicKey); |
| | | alipayConfig.setCharset("UTF8"); |
| | | alipayConfig.setSignType("RSA2"); |
| | | AlipayClient alipayClient = new DefaultAlipayClient(alipayConfig); |
| | | // 这是一个1x1像素的图片流 |
| | | String imageBase64 = "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAEUlEQVR42mP4TyRgGFVIX4UAI/uOgGWVNeQAAAAASUVORK5CYII="; |
| | | // 下列FileItem中也可用直接读取本地文件的方式来获取文件 |
| | | // FileItem imageContent = new FileItem("本地文件的绝对路径"); |
| | | AntMerchantExpandIndirectImageUploadRequest request = new AntMerchantExpandIndirectImageUploadRequest(); |
| | | FileItem imageContent = new FileItem("https://we-park-life.oss-cn-beijing.aliyuncs.com/img/73d85c4b522f4077bda8d20f51439a33.JPG", Base64.getDecoder().decode(imageBase64)); |
| | | request.setImageContent(imageContent); |
| | | request.setImageType("jpg"); |
| | | AntMerchantExpandIndirectImageUploadResponse response = alipayClient.execute(request); |
| | | System.out.println(response.getBody()); |
| | | if (response.isSuccess()) { |
| | | System.out.println("调用成功"); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.AlipayClient; |
| | | import com.alipay.api.DefaultAlipayClient; |
| | | import com.alipay.api.request.AlipayMerchantIndirectAuthorderQuerystatusRequest; |
| | | import com.alipay.api.response.AlipayMerchantIndirectAuthorderQuerystatusResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.guns.modular.system.model.OperatorAuth; |
| | | import com.dsh.guns.modular.system.service.IOperatorAuthService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Configuration //1.主要用于标记配置类,兼备Component的效果。 |
| | | @EnableScheduling // 2.开启定时任务 |
| | | public class SaticScheduleTask { |
| | | @Autowired |
| | | private IOperatorAuthService operatorAuthService; |
| | | // 一个小时执行一次 |
| | | @Scheduled(fixedRate=3600000) |
| | | private void configureTasks() { |
| | | System.err.println("执行定时任务时间: " + LocalDateTime.now()); |
| | | // 回查商户认证单审核状态 查询除了审核通过以外的认证单 |
| | | List<OperatorAuth> list = operatorAuthService.list(new QueryWrapper<OperatorAuth>().ne("orderStatus", "AUDIT_PASS")); |
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","2021004123692417", |
| | | "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDe188UHA8lR8CjG6KeKIYjYw6UfpJOl7nyklpiZKfbJ1q70D+LEdEZbWrzZ2eSwqeD+7B/ZV8Hyum9vrU6FPbgc6q/vy73ji0o1AhQP0GPPtcnNaAP9IppwchTSEjvODKMHSotB64LSBuFLgtAGSAJ6nHPXlEcyV5Y4Dev/E1JD3b9N2uTXilW5zZ2o1IxwXBIxuU0Tw7wHXUjcaXbpGuQUGIq54fzsbqP4TjSVoa8S41FhbtP9n61NulUtGFRfyHxpo/kj4cx3o6P4s+PBo/T2DlaMkpI6cRx0rfjL1ZkXrDJLYcCokUKxiJ/trrGjdYFUz6r2TGe1kAnjehkW+TTAgMBAAECggEAWMKtAN2MStUhrdY8F7Mcesvh6tPfgt58elpBFh/xnCE4ysZQCRy3pOEoUHtHjfVqs+90hcni6D+yipmDpfbjvtNTl7yXAJPo+PI7vXr0qhHlsQBzGOfWmflNyZ5pLp+7woN7YSRF9shp7cpBQO7BDDIN0wNGW6j5o3zrsXVVc1uu5ndD0kxV6XM3P43EY8mMdRXT9UmF0WTomLQ7JxhlY23fgYmS7USZUKkN9BkKAbwnxdskDnFT94infup4kbWoPr5DFeMESPdsE+tNbbUGCKzqYzgoTpf5jOKThyt1/HQWCuYLbui3GDJ704eEPypFDgl8Mh+y8UOBiuKfjB4xgQKBgQD+v0cO6rU7ce7R3y+4LgZoEGfEfjvWGH+BEowDk0UFIWxfPlwgTGl5/OZHO7Y55QQzNsxxl8jUIXxVicyhYoKI0+uOeJ7bKmi08hb6BAQ1eTRaukRtMBbCo/FvBbE14vt2dnpidvCPv/KC0sQG1J+vUxUzSt94URvxNVBcRbsXCQKBgQDf8F1QZ4pUYP9KSCmUWbzpotAr+m84Q7Oqf4zc70p8rU8nGQSnNrQQWddqwF/UEiNniDj+n0FVwiEMslRWSqPYixyqI3dHuVxhi/4wdoIewCHq3MkcqHksl9y67Bhl8HXMGmg79IxiCsqj7oEF8aGJjAyEZm3d2roz0QNPQCaX+wKBgQCazX+Px/7jpcN7k4W7BXTtLfLwy8juvCpXM/8TeR27FWl2oz12fxilgZIp/VYp7kpUGNu5t4PZrJOSo09PTr6GCUmeZRwbkLTaKDbgLSqlmAbBj2lfdJaQJvHjBnF+jnVCspKCXUaoA/uJlix6/iAfeXxrk/cidR9mv4Aa4mDjiQKBgG2+SKyfoT3KrzFC/gVymM7SeDwlJZ4oJ4M1sN2Q8yr4b+LUMuCTQVkF/jiVgCDYprsVGgFGIGmbkkC7n/MN7w+u1ORYLxtaLnird21ellPlinmjq3c85O1CmuyLyUUju0bD5jMDnExrx3Tg7B/yk1xp4rR70fm4OCoukvWilYdDAoGBAK3Y77tqbno+D6W95fb8xb4xUUd1tEWgSY6CgjaqTRzbJ38cGuo92gBjKhDGLwaztcCw4yKPhEOum7nBGKKyxFfs8Z4vsG+m19JSdBfHf3PLModZwnjrRpatAnjTUW0DbPz+sfAwMgLnTCpElcSRQwjmioVAucCyd2FlMmqP5xB4","json","GBK", |
| | | "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCzq4BIE4gMdEXxIAAUbiMpSytkzp+LVLVsBtji87rFGfWUcnrr3NKftaw0WtRu+36d1nDVOWW4CmgsOPyj1GOFoTcJOR/BqyIriwyLxpuMS8qgOqGJZXi+W4Nw2AJL6iMVwY2eI8F1G10gACK2I9TNJRzHh3tMTA6ItysbGoekRDtn6Xrkh5V6cyHQjLw0Q6MJK/68XT6/LWzarDEEYrSnIevOydMY32ptAgm5fp/h08M2khCmI6CuMWKmc87dPpd2krGVTALqprAQvB74AIqO+5DE0fN4LoitOYXAtWDCEF4kHN0hQUygIEGCwtMgEVzkf92VLlCX35YtDhWd1yQIDAQAB","RSA2"); |
| | | for (OperatorAuth operatorAuth : list) { |
| | | // 第三步:查询申请单审核结果 |
| | | AlipayMerchantIndirectAuthorderQuerystatusRequest request1 = new AlipayMerchantIndirectAuthorderQuerystatusRequest(); |
| | | request1.setBizContent("{" + |
| | | " \"order_no\":\""+operatorAuth.getOrderNo()+"\"," + |
| | | " \"out_biz_no\":\""+operatorAuth.getOutBizNo()+"\"," + |
| | | "}"); |
| | | AlipayMerchantIndirectAuthorderQuerystatusResponse response1 = null; |
| | | try { |
| | | response1 = alipayClient.execute(request1); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if(response1.isSuccess()){ |
| | | System.out.println("调用成功"); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | JSONObject json = JSONObject.parseObject(response1.getBody()); |
| | | JSONObject sign = json.getJSONObject("alipay_merchant_indirect_authorder_querystatus_response"); |
| | | String orderNo = sign.getString("order_no"); |
| | | String order_status = sign.getString("order_status"); |
| | | operatorAuth.setOrderStatus(order_status); |
| | | operatorAuth.setOrderNo(orderNo); |
| | | // 失败原因 |
| | | JSONObject verify_list = sign.getJSONObject("verify_list"); |
| | | // 失败原因 |
| | | if (verify_list!=null){ |
| | | String fail_reason = verify_list.getString("fail_reason"); |
| | | operatorAuth.setRefuseReason(fail_reason); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addAdvertisement") |
| | | public ResultUtil addAdvertisement(@RequestBody Banner banner) { |
| | | if (banner.getType().equals("请选择")){ |
| | | banner.setType(null); |
| | | } |
| | | if (banner.getPage().equals("请选择")){ |
| | | banner.setPage(null); |
| | | } |
| | | banner.setInsertTime(new Date()); |
| | | bannerClient.addAdvertisement(banner); |
| | | return ResultUtil.success("添加成功"); |
| | |
| | | if (banner.getImg().equals("")||banner==null){ |
| | | banner.setImg(byId.getImg()); |
| | | } |
| | | |
| | | if (banner.getType().equals("请选择")){ |
| | | banner.setType(null); |
| | | } |
| | | if (banner.getPage().equals("请选择")){ |
| | | banner.setPage(null); |
| | | } |
| | | |
| | | |
| | | bannerClient.updateAdvertisement(banner); |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.*; |
| | | import com.alipay.api.request.AlipayMerchantIndirectAuthorderCreateRequest; |
| | | import com.alipay.api.request.AlipayMerchantIndirectAuthorderQuerystatusRequest; |
| | | import com.alipay.api.request.AntMerchantExpandIndirectImageUploadRequest; |
| | | import com.alipay.api.response.AlipayMerchantIndirectAuthorderCreateResponse; |
| | | import com.alipay.api.response.AlipayMerchantIndirectAuthorderQuerystatusResponse; |
| | | import com.alipay.api.response.AntMerchantExpandIndirectImageUploadResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | | import com.dsh.course.feignClient.account.CoachTypeClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.account.model.CoachSerchVO; |
| | | import com.dsh.course.feignClient.account.model.CoachType; |
| | | import com.dsh.guns.config.UserExt; |
| | | |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.common.constant.factory.PageFactory; |
| | | import com.dsh.guns.core.util.SinataUtil; |
| | | import com.dsh.guns.modular.system.controller.util.MD5; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.service.impl.TOperatorUserServiceImpl; |
| | | |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.catalina.valves.RemoteIpValve; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private IUserService userService; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | @Autowired |
| | | private IOperatorAuthService operatorAuthService; |
| | | /** |
| | | * 跳转运营商管理首页 |
| | | */ |
| | |
| | | */ |
| | | @RequestMapping("/proportionAuth/{id}") |
| | | public String proportionAuth(Model model,@PathVariable("id") Integer id) { |
| | | model.addAttribute("operatorId",id); |
| | | model.addAttribute("id",id); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("provinceList",list); |
| | | return PREFIX + "OperatorUser_proportionAuth.html"; |
| | | } |
| | | |
| | | /** |
| | | * 商户认证提交 |
| | | */ |
| | | @RequestMapping(value = "/auth") |
| | | @ResponseBody |
| | | public Object auth(Integer alipayType,Integer wechatType,String alipayNum,String wechatNum,Integer operatorId ) { |
| | | TOperator id = operatorService.getOne(new QueryWrapper<TOperator>().eq("id", operatorId)); |
| | | OperatorUser operatorUser = new OperatorUser(); |
| | | operatorUser.setUserId(id.getUserId()); |
| | | operatorUser.setAlipay("支付宝"); |
| | | operatorUser.setWechat("微信"); |
| | | operatorUser.setWechatType(wechatType); |
| | | operatorUser.setAlipayType(alipayType); |
| | | operatorUser.setAlipayNum(alipayNum); |
| | | operatorUser.setWechatNum(wechatNum); |
| | | operatorUser.setOperatorId(operatorId); |
| | | operatorUserService.save(operatorUser); |
| | | // 修改运营商状态为 已认证 |
| | | id.setStatus(2); |
| | | operatorService.updateById(id); |
| | | public Object auth(String beneficiaryEnd,String businessEnd,String legalEnd, String name,String phone,String number,Integer operatorId,String bodyType,Integer type,String businessName,String businessNumber, |
| | | String legalRepresentative,String registerAddress,String businessTerm,String businessPicture, |
| | | String legalPerson,String legalNumber,String legalPhone,String legalEmail,String legalTerm, |
| | | String legalAddress,String legalFront,String legalBack,Integer accountType,String bank, |
| | | String accountName,String province,String provinceCode,String city,String cityCode, |
| | | String bankName,String bankNumber,String isBeneficiary,String beneficiary,String beneficiaryPhone, |
| | | String beneficiaryNumber,String beneficiaryAddress,String beneficiaryTerm,String beneficiaryFront,String beneficiaryBack, |
| | | String remark) { |
| | | UUID uuid = UUID.randomUUID(); |
| | | String numericUUID = uuid.toString().replaceAll("-", ""); |
| | | OperatorAuth operatorAuth = new OperatorAuth(); |
| | | operatorAuth.setName(name); |
| | | operatorAuth.setPhone(phone); |
| | | operatorAuth.setNumber(number); |
| | | operatorAuth.setBusinessEnd(businessEnd); |
| | | operatorAuth.setLegalEnd(legalEnd); |
| | | operatorAuth.setBeneficiaryEnd(beneficiaryEnd); |
| | | operatorAuth.setOperatorId(operatorId); |
| | | operatorAuth.setBodyType(bodyType); |
| | | operatorAuth.setType(type); |
| | | operatorAuth.setBusinessName(businessName); |
| | | operatorAuth.setBusinessNumber(businessNumber); |
| | | operatorAuth.setLegalRepresentative(legalRepresentative); |
| | | operatorAuth.setRegisterAddress(registerAddress); |
| | | operatorAuth.setBusinessTerm(businessTerm); |
| | | operatorAuth.setOutBizNo(numericUUID); |
| | | operatorAuth.setBusinessPicture(businessPicture); |
| | | operatorAuth.setLegalPerson(legalPerson); |
| | | operatorAuth.setLeagleNumber(legalNumber); |
| | | operatorAuth.setLegalPhone(legalPhone); |
| | | operatorAuth.setLegalEmail(legalEmail); |
| | | operatorAuth.setLegalTerm(legalTerm); |
| | | operatorAuth.setLegalAddress(legalAddress); |
| | | operatorAuth.setLegalFront(legalFront); |
| | | operatorAuth.setLegalBack(legalBack); |
| | | operatorAuth.setAccountType(accountType); |
| | | operatorAuth.setBank(bank); |
| | | operatorAuth.setAccountName(accountName); |
| | | operatorAuth.setProvince(province); |
| | | operatorAuth.setProvinceCode(provinceCode); |
| | | operatorAuth.setCity(city); |
| | | operatorAuth.setCityCode(cityCode); |
| | | operatorAuth.setBankName(bankName); |
| | | operatorAuth.setBankNumber(bankNumber); |
| | | operatorAuth.setAuditState(0); |
| | | operatorAuth.setIsBeneficiary(isBeneficiary); |
| | | operatorAuth.setBeneficiary(beneficiary); |
| | | operatorAuth.setBeneficiaryNumber(beneficiaryNumber); |
| | | operatorAuth.setBeneficiaryAddress(beneficiaryAddress); |
| | | operatorAuth.setBeneficiaryTerm(beneficiaryTerm); |
| | | operatorAuth.setBeneficiaryFront(beneficiaryFront); |
| | | operatorAuth.setBeneficiaryBack(beneficiaryBack); |
| | | operatorAuth.setRefuseReason(""); |
| | | operatorAuth.setRemark(remark); |
| | | |
| | | |
| | | // 将图片上传至阿里存储 |
| | | // 营业执照 |
| | | String string = uploadImg(businessPicture).toString(); |
| | | // 法人身份证正面照 |
| | | legalFront = uploadImg(legalFront).toString(); |
| | | // 法人身份证背面照 |
| | | legalBack = uploadImg(legalBack).toString(); |
| | | |
| | | if (bodyType.equals("ENTERPRISE")){ |
| | | // 受益人身份证正面照 |
| | | beneficiaryFront=uploadImg(beneficiaryFront).toString(); |
| | | // 受益人身份证背面照 |
| | | beneficiaryBack=uploadImg(beneficiaryBack).toString(); |
| | | } |
| | | |
| | | |
| | | //第二步:提交申请单 |
| | | AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","2021004123692417", |
| | | "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDe188UHA8lR8CjG6KeKIYjYw6UfpJOl7nyklpiZKfbJ1q70D+LEdEZbWrzZ2eSwqeD+7B/ZV8Hyum9vrU6FPbgc6q/vy73ji0o1AhQP0GPPtcnNaAP9IppwchTSEjvODKMHSotB64LSBuFLgtAGSAJ6nHPXlEcyV5Y4Dev/E1JD3b9N2uTXilW5zZ2o1IxwXBIxuU0Tw7wHXUjcaXbpGuQUGIq54fzsbqP4TjSVoa8S41FhbtP9n61NulUtGFRfyHxpo/kj4cx3o6P4s+PBo/T2DlaMkpI6cRx0rfjL1ZkXrDJLYcCokUKxiJ/trrGjdYFUz6r2TGe1kAnjehkW+TTAgMBAAECggEAWMKtAN2MStUhrdY8F7Mcesvh6tPfgt58elpBFh/xnCE4ysZQCRy3pOEoUHtHjfVqs+90hcni6D+yipmDpfbjvtNTl7yXAJPo+PI7vXr0qhHlsQBzGOfWmflNyZ5pLp+7woN7YSRF9shp7cpBQO7BDDIN0wNGW6j5o3zrsXVVc1uu5ndD0kxV6XM3P43EY8mMdRXT9UmF0WTomLQ7JxhlY23fgYmS7USZUKkN9BkKAbwnxdskDnFT94infup4kbWoPr5DFeMESPdsE+tNbbUGCKzqYzgoTpf5jOKThyt1/HQWCuYLbui3GDJ704eEPypFDgl8Mh+y8UOBiuKfjB4xgQKBgQD+v0cO6rU7ce7R3y+4LgZoEGfEfjvWGH+BEowDk0UFIWxfPlwgTGl5/OZHO7Y55QQzNsxxl8jUIXxVicyhYoKI0+uOeJ7bKmi08hb6BAQ1eTRaukRtMBbCo/FvBbE14vt2dnpidvCPv/KC0sQG1J+vUxUzSt94URvxNVBcRbsXCQKBgQDf8F1QZ4pUYP9KSCmUWbzpotAr+m84Q7Oqf4zc70p8rU8nGQSnNrQQWddqwF/UEiNniDj+n0FVwiEMslRWSqPYixyqI3dHuVxhi/4wdoIewCHq3MkcqHksl9y67Bhl8HXMGmg79IxiCsqj7oEF8aGJjAyEZm3d2roz0QNPQCaX+wKBgQCazX+Px/7jpcN7k4W7BXTtLfLwy8juvCpXM/8TeR27FWl2oz12fxilgZIp/VYp7kpUGNu5t4PZrJOSo09PTr6GCUmeZRwbkLTaKDbgLSqlmAbBj2lfdJaQJvHjBnF+jnVCspKCXUaoA/uJlix6/iAfeXxrk/cidR9mv4Aa4mDjiQKBgG2+SKyfoT3KrzFC/gVymM7SeDwlJZ4oJ4M1sN2Q8yr4b+LUMuCTQVkF/jiVgCDYprsVGgFGIGmbkkC7n/MN7w+u1ORYLxtaLnird21ellPlinmjq3c85O1CmuyLyUUju0bD5jMDnExrx3Tg7B/yk1xp4rR70fm4OCoukvWilYdDAoGBAK3Y77tqbno+D6W95fb8xb4xUUd1tEWgSY6CgjaqTRzbJ38cGuo92gBjKhDGLwaztcCw4yKPhEOum7nBGKKyxFfs8Z4vsG+m19JSdBfHf3PLModZwnjrRpatAnjTUW0DbPz+sfAwMgLnTCpElcSRQwjmioVAucCyd2FlMmqP5xB4","json","GBK", |
| | | "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCzq4BIE4gMdEXxIAAUbiMpSytkzp+LVLVsBtji87rFGfWUcnrr3NKftaw0WtRu+36d1nDVOWW4CmgsOPyj1GOFoTcJOR/BqyIriwyLxpuMS8qgOqGJZXi+W4Nw2AJL6iMVwY2eI8F1G10gACK2I9TNJRzHh3tMTA6ItysbGoekRDtn6Xrkh5V6cyHQjLw0Q6MJK/68XT6/LWzarDEEYrSnIevOydMY32ptAgm5fp/h08M2khCmI6CuMWKmc87dPpd2krGVTALqprAQvB74AIqO+5DE0fN4LoitOYXAtWDCEF4kHN0hQUygIEGCwtMgEVzkf92VLlCX35YtDhWd1yQIDAQAB","RSA2"); |
| | | AlipayMerchantIndirectAuthorderCreateRequest request = new AlipayMerchantIndirectAuthorderCreateRequest(); |
| | | String param = "{" + |
| | | " \"out_biz_no\":\""+uuid+"\"," + |
| | | " \"contact_person_info\":{" + |
| | | " \"contact_name\":\""+name+"\"," + |
| | | " \"contact_phone_no\":\""+phone+"\"," + |
| | | " \"contact_card_no\":\""+number+"\"," + |
| | | " \"contact_cert_type\":\"RESIDENT\"" + |
| | | " }," + |
| | | " \"auth_identity_info\":{" + |
| | | " \"identity_type\":\""+bodyType+"\"," + |
| | | " \"is_financial_org\":false," + |
| | | " \"certificate_type\":\"BUSINESS_CERT\"," + |
| | | " \"certificate_info\":{" + |
| | | " \"cert_no\":\""+businessNumber+"\"," + |
| | | " \"cert_image\":\""+string+"\"," + |
| | | " \"merchant_name\":\""+businessName+"\"," + |
| | | " \"legal_person_name\":\""+legalRepresentative+"\"," + |
| | | " \"register_address\":\""+registerAddress+"\"," + |
| | | " \"effect_time\":\""+businessTerm+"\"," + |
| | | " \"expire_time\":\""+businessEnd+"\"" + |
| | | " }," + |
| | | " }," + |
| | | " \"legal_person_info\":{" + |
| | | " \"card_type\":\"RESIDENT\"," + |
| | | " \"person_name\":\""+legalRepresentative+"\"," + |
| | | " \"card_no\":\""+legalNumber+"\"," + |
| | | " \"effect_time\":\""+legalTerm+"\"," + |
| | | " \"expire_time\":\""+legalEnd+"\"," + |
| | | " \"card_front_img\":\""+legalFront+"\"," + |
| | | " \"card_back_img\":\""+legalBack+"\"," + |
| | | " \"is_benefit_person\":"+isBeneficiary+"" + |
| | | " },"; |
| | | String bene = " \"benefit_person_info\":{" + |
| | | " \"person_name\":\""+beneficiary+"\"," + |
| | | " \"card_no\":\""+beneficiaryNumber+"\"," + |
| | | " \"card_type\":\"RESIDENT\"," + |
| | | " \"effect_time\":\""+beneficiaryTerm+"\"," + |
| | | " \"expire_time\":\""+beneficiaryEnd+"\"," + |
| | | " \"card_front_img\":\""+beneficiaryFront+"\"," + |
| | | " \"card_back_img\":\""+beneficiaryBack+"\"" + |
| | | " },"; |
| | | if (bodyType.equals("ENTERPRISE")){ |
| | | request.setBizContent(param |
| | | + bene+ |
| | | "}"); |
| | | }else{ |
| | | request.setBizContent(param |
| | | + |
| | | "}"); |
| | | } |
| | | |
| | | AlipayMerchantIndirectAuthorderCreateResponse response = null; |
| | | try { |
| | | response = alipayClient.execute(request); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if(response.isSuccess()){ |
| | | System.out.println("上传认证单"); |
| | | JSONObject json = JSONObject.parseObject(response.getBody()); |
| | | JSONObject json1 = json.getJSONObject("alipay_merchant_indirect_authorder_create_response"); |
| | | String order_no = json1.getString("order_no"); |
| | | String order_status = json1.getString("order_status"); |
| | | // // 申请单号 |
| | | // String orderNo = r.getString("order_no"); |
| | | /** |
| | | * 状态 审核中(AUDITING)、待联系人确认(CONTACT_CONFIRM), |
| | | * 待法人确认(LEGAL_CONFIRM)、审核通过(AUDIT_PASS)、 |
| | | * 审核失败(AUDIT_REJECT)、已冻结(AUDIT_FREEZE)、 |
| | | * 已撤回(CANCELED)、联系人处理中(CONTACT_PROCESSING) |
| | | */ |
| | | // String orderStatus = r.getString("order_status"); |
| | | operatorAuth.setOrderNo(order_no); |
| | | operatorAuth.setOrderStatus(order_status); |
| | | operatorAuthService.save(operatorAuth); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | public static Object uploadImg(String img){ |
| | | String privateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCSsmylIHe0j0pRQrB9p5ljryk9Qg2Z/JgIh+gtZES1TDo35YVw24aRRt7pkY7oHIZqpMRmSsWND1t63LVuNlpq532LG0iEJVJS53GzpRoHDD3iD01GmUoNjkCL36NCrbY0hTDDw7GZnYuJ8194Sss7OEoi7Mghg/XUreX4awwpWngTepCF7zs0S4YJQWyGY4JI6ooGraW23siBVY5MUI9XXLL6UKIExUfKe7zRihs8SrTHNnXtDT6EKYYo8P6M90Xuk173QsK2Xguk1FQ5Blh2ts7UvZVjP+WoQwDvrnqruve5kzDD9gwnAYUvhY66mtlxeub9nf5LLTtCliXeUZpNAgMBAAECggEAaPShSM9e9d9jM5p8PZqw4yJKZhqhMqAHgmsCUZ+gjPn52U4s198oez5ydDgBP85Q2XIDVpB+oPrw34mTgUQAEuaG6wTdMDannMscjYQ9h/dZOyjph+5ajjJNugWKgEVazF7S0e1sXtTaJhvrHVyd5UPTvwMb+Oa59q1okQC91cNa2vJzXiC7dfqWXZW/otmmOpcIcCN8dVDG3YhAuc5ZiT78Ca8x9GHWfw7cw1FRewRZlp/YnD2fJeWEesfvGCV36zCksrJrZz5MFMdf1Qh6+tHxK+E5sPNGdbooviTRnNWrsgyS9NcXFSQItOZQHsbLVID/Bs0kxkYPzbsfX1vRXQKBgQDsBDNZxpmSZJZ/4HfCOfHytWAkH/GHE3GOYH4TdHKLXfxRCinU23OtdrU2Sy8tBZvaajDKkWvMkjWT2w+56+z+xTprTf2PL/LS9zWCc8LPKbif6NfnwaOE8pIBrvkBskGKwbIE2fFVT0B4hNsR80TbPxvvAfCKjUj67qrTXSal+wKBgQCfHiuq/gLuSD2fuplzCwu0Rm/wr56bUpxhq9WNGaPOybR6EPq/wTKp0ow+f9uSuTm2NZhi/TWTXHOizy9vcZChRpj03a7NYwUOw36zvW7SHuF0Uhsp8TrZTyCj1XdhdLyJ9JMyL2DTRpGtLUR01ZSrdXPax7/Xu+OHubijqRD2VwKBgFqCveKm7AwdMS43OhYtPKE0d3tDGNARX9IXJSJ23Nqfn3zApgwwYKtcQ+BfcucUKJHZeX6lyC56v7tFHkHRvWBy6JVwIlZAMCJBla7CkCn8OQZyOCJzuy7oC6BDptDEuKfq4kdEAW4S54mQgabfoT9nc2H0X3fy+NLqpm5KYeDzAoGAYerlIILUNuKJ2aOxDpS7jSLTfB/20MqTpZ9i+UPQBE8oGv4b8Kjpjowc9dEkxDPsCe8Nac08jQSVvJkXLdOLF1QkiHtrOMU4tY8kh2OJsRCD2Vs1kCf8+QGyql+Q6Y43AAZcFsQFJ78Dorh6qhNNO/45X2cQ7aeYK0vlDgHaiF0CgYA4k9Q1tc8sU67TgT9cmMM6hG7/Rf3cU3PIdYuojs1EIG+1BJ7TlEiNAHoPtphlGFFeDP3SVnf59RfYH+BbLiz1JX9p/KFKRRkoXtfd6bySVWHvj4x2WiVpKFvHxhxc3LRubx0ryLGR/tpUJzxp+9luanU/WgSRFKiEZJZqFjjDzw=="; |
| | | String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApCzq4BIE4gMdEXxIAAUbiMpSytkzp+LVLVsBtji87rFGfWUcnrr3NKftaw0WtRu+36d1nDVOWW4CmgsOPyj1GOFoTcJOR/BqyIriwyLxpuMS8qgOqGJZXi+W4Nw2AJL6iMVwY2eI8F1G10gACK2I9TNJRzHh3tMTA6ItysbGoekRDtn6Xrkh5V6cyHQjLw0Q6MJK/68XT6/LWzarDEEYrSnIevOydMY32ptAgm5fp/h08M2khCmI6CuMWKmc87dPpd2krGVTALqprAQvB74AIqO+5DE0fN4LoitOYXAtWDCEF4kHN0hQUygIEGCwtMgEVzkf92VLlCX35YtDhWd1yQIDAQAB"; |
| | | AlipayConfig alipayConfig = new AlipayConfig(); |
| | | alipayConfig.setServerUrl("https://openapi.alipay.com/gateway.do"); |
| | | alipayConfig.setAppId("2021004123692417"); |
| | | alipayConfig.setPrivateKey(privateKey); |
| | | alipayConfig.setFormat("json"); |
| | | alipayConfig.setAlipayPublicKey(alipayPublicKey); |
| | | alipayConfig.setCharset("UTF8"); |
| | | alipayConfig.setSignType("RSA2"); |
| | | AlipayClient alipayClient = null; |
| | | try { |
| | | alipayClient = new DefaultAlipayClient(alipayConfig); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // 这是一个1x1像素的图片流 |
| | | String imageBase64 = "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAEUlEQVR42mP4TyRgGFVIX4UAI/uOgGWVNeQAAAAASUVORK5CYII="; |
| | | // 下列FileItem中也可用直接读取本地文件的方式来获取文件 |
| | | // FileItem imageContent = new FileItem("本地文件的绝对路径"); |
| | | AntMerchantExpandIndirectImageUploadRequest request = new AntMerchantExpandIndirectImageUploadRequest(); |
| | | FileItem imageContent = new FileItem(img, Base64.getDecoder().decode(imageBase64)); |
| | | request.setImageContent(imageContent); |
| | | request.setImageType("jpg"); |
| | | AntMerchantExpandIndirectImageUploadResponse response = null; |
| | | try { |
| | | response = alipayClient.execute(request); |
| | | } catch (AlipayApiException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.out.println(response.getBody()); |
| | | if (response.isSuccess()) { |
| | | System.out.println("调用成功"); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | JSONObject json = JSONObject.parseObject(response.getBody()); |
| | | String sign = json.getString("ant_merchant_expand_indirect_image_upload_response"); |
| | | JSONObject r = JSONObject.parseObject(sign); |
| | | String image_id = r.getString("image_id"); |
| | | return image_id; |
| | | } |
| | | |
| | | /** |
| | | * 分账比例提交 |
| | | */ |
| | |
| | | user.setAccount(phone); |
| | | user.setRoleid("2"); |
| | | user.setObjectType(2); |
| | | user.setStatus(1); |
| | | userService.save(user); |
| | | TOperator data = new TOperator(); |
| | | data.setUserId(user.getId()); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ResultUtil.success("添加成功"); |
| | | } |
| | | /** |
| | |
| | | import com.dsh.course.feignClient.other.StoreClient; |
| | | import com.dsh.course.feignClient.other.model.SiteChangeStateVO; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.controller.util.MD5; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRoleService; |
| | |
| | | @ResponseBody |
| | | public Object addAppUser(@RequestBody TAppUser appUser){ |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | appUser.setPassword(MD5.md5("111111")); |
| | | appUser.setInsertType(objectType); |
| | | appUser.setAddUserId(UserExt.getUser().getObjectId()); |
| | | Object o = appUserClient.addAppUser1(appUser); |
| | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | System.out.println(objectType); |
| | | model.addAttribute("item",coupon); |
| | | model.addAttribute("objectType",objectType); |
| | | return PREFIX + "TCouponInfo.html"; |
| | | } |
| | | |
| | |
| | | @RequestMapping("/storeDetailsOfSearch") |
| | | @ResponseBody |
| | | public Object listOfStore(String provinceId,String cityId,Integer operatorId,String storeName){ |
| | | |
| | | |
| | | if (UserExt.getUser().getObjectType()== 2){ |
| | | // 筛选这个运营商下的门店 |
| | | operatorId = UserExt.getUser().getObjectId(); |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceId,cityId,operatorId,storeName,page); |
| | | if (storeList.size() > 0 ){ |
| | |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setStatus(status); |
| | | ofSearch.setState(state); |
| | | if (UserExt.getUser().getObjectType()==2) { |
| | | ofSearch.setOperatorId(UserExt.getUser().getObjectId()); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==3) { |
| | | ofSearch.setStoreId(UserExt.getUser().getObjectId()); |
| | | ofSearch.setObjType(UserExt.getUser().getObjectType()); |
| | | } |
| | | |
| | | |
| | | return client.getCouponListOfSearch(ofSearch); |
| | | } |
| | | |
| | |
| | | System.out.println(dataVo); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | dataVo.setUserType(objectType); |
| | | dataVo.setCityManagerId(UserExt.getUser().getObjectId()); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | dataVo.setStoreIds(UserExt.getUser().getObjectId().toString()); |
| | | dataVo.setCompany(3); |
| | | } |
| | | dataVo.setObjType(UserExt.getUser().getObjectType()); |
| | | client.insertIntoData(dataVo); |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |
| | | @PostMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update( Integer id,Integer num,Integer num1,String text){ |
| | |
| | | coupon.setQuantityIssued(num); |
| | | coupon.setPickUpQuantity(num1); |
| | | coupon.setIllustrate(text); |
| | | if (UserExt.getUser().getObjectType()==3) { |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | client.updateCouponData(coupon); |
| | | return new SuccessTip<>(); |
| | | } |
| | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | wrapper.eq(TStore::getId, UserExt.getUser().getObjectId()); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | wrapper.eq(TStore::getOperatorId, UserExt.getUser().getObjectId()); |
| | | } |
| | | List<TStore> list = storeService.list(wrapper); |
| | | Page<DiscountList> page = new PageFactory<DiscountList>().defaultPage(); |
| | | List<DiscountList> discountLists = courseClient.queryDiscountList(new QueryDiscountList(page.getCurrent(),page.getSize(),provinceCode,cityCode,name,type,list.stream().map(TStore::getId).collect(Collectors.toList()))); |
| | |
| | | query.setProvince(province); |
| | | query.setCity(city); |
| | | query.setStoreId(storeId); |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())).stream() |
| | | .map(TStore::getId).collect(Collectors.toList()); |
| | | query.setStoresIds(operatorId); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | query.setStoreId(UserExt.getUser().getObjectId()); |
| | | } |
| | |
| | | @RequestMapping(value = "/incomeListAll") |
| | | @ResponseBody |
| | | public List<IncomeVO> incomeListAll(String time,Integer incomeType,String userName,String amount) { |
| | | |
| | | // 充值记录查询query |
| | | RechargeRecordsQuery rechargeRecordsQuery = new RechargeRecordsQuery(); |
| | | // 报名课程查询query |
| | |
| | | competitionQuery.setAmount(new BigDecimal(amount)); |
| | | incomeQuery.setAmount(new BigDecimal(amount)); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | // 拿到门店集合id |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())).stream() |
| | | .map(TStore::getId).collect(Collectors.toList()); |
| | | query.setStoresIds(operatorId); |
| | | competitionQuery.setOperatorId(UserExt.getUser().getObjectId()); |
| | | siteBookingQuery.setStoreIds(operatorId); |
| | | } |
| | | |
| | | siteBookingQuery.setTime(time); |
| | | query.setRegisterTime(time); |
| | |
| | | IncomeVO incomeVO = new IncomeVO(); |
| | | List<IncomeVO> incomeVOS = new ArrayList<>(); |
| | | |
| | | if (roleType == 1){ |
| | | if ( incomeType==null || incomeType == 1){ |
| | | // 会员支付记录 |
| | | List<VipPayment> vipPayments = vipPaymentClient.registrationList(incomeQuery); |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | break; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(vipPayment.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(vipPayment.getId()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | temp.setStoreName(""); |
| | | temp.setAmount(new BigDecimal(vipPayment.getAmount().toString())); |
| | | temp.setIncomeType(1); |
| | | temp.setState(vipPayment.getState()); |
| | | temp.setInsertTime(vipPayment.getInsertTime()); |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | break; |
| | | } |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | |
| | | // 充值记录 |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(rechargeRecordsQuery); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | break; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(rechargeRecordsVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(rechargeRecordsVO.getId().intValue()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | temp.setStoreName(""); |
| | | temp.setInsertTime(rechargeRecordsVO.getInsertTime()); |
| | | if (rechargeRecordsVO.getAmount() != null) { |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | temp.setIncomeType(2); |
| | | temp.setState(rechargeRecordsVO.getPayStatus()); |
| | | |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | |
| | | TAppUser tAppUser = appUserClient.queryById(registerOrderVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(registerOrderVO.getId().intValue()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(registerOrderVO.getStoreName()); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | |
| | | temp.setStoreName(registerOrderVO.getStoreName()); |
| | | |
| | | temp.setInsertTime(registerOrderVO.getInsertTime()); |
| | | if (registerOrderVO.getMoney() != null) { |
| | | temp.setAmount(registerOrderVO.getMoney()); |
| | |
| | | if (competition.getPayStatus() == 3) { |
| | | continue; |
| | | } |
| | | IncomeVO temp = new IncomeVO(); |
| | | TAppUser tAppUser = appUserClient.queryById(competition.getAppUserId()); |
| | | Competition competition1 = competitionClient.queryById(competition.getCompetitionId()); |
| | | if (!competition1.getStoreId().equals("")){ |
| | | String[] split = competition1.getStoreId().split(","); |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (String s : split) { |
| | | list.add(Integer.valueOf(s)); |
| | | } |
| | | Store store = storeClient.getStoreById(Integer.valueOf(competition1.getStoreId())); |
| | | IncomeVO temp = new IncomeVO(); |
| | | List<TStore> id = storeService.list(new QueryWrapper<TStore>().in("id", list)); |
| | | StringBuilder storeNames = new StringBuilder(""); |
| | | for (TStore store : id) { |
| | | // 赛事举办门店 (可能会有多个门店举办 需要拼接门店名称) |
| | | storeNames.append(store.getName() + ","); |
| | | } |
| | | String substring = storeNames.toString().substring(0, storeNames.toString().length() - 1); |
| | | |
| | | temp.setStoreName(substring); |
| | | } |
| | | temp.setId(competition.getId().intValue()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | |
| | | } else { |
| | | temp.setState(2); |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(siteBooking.getAppUserId()); |
| | | TAppUser tAppUser = appUserClient.queryAppUser1(siteBooking.getAppUserId()); |
| | | Store store = storeClient.getStoreById(siteBooking.getStoreId()); |
| | | |
| | | temp.setId(siteBooking.getId()); |
| | | temp.setProvince(siteBooking.getProvince()); |
| | | temp.setCity(siteBooking.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | |
| | | temp.setInsertTime(siteBooking.getInsertTime()); |
| | | if (siteBooking.getPayMoney() != null) { |
| | | temp.setAmount(new BigDecimal(siteBooking.getPayMoney().toString())); |
| | | } |
| | | temp.setIncomeType(5); |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | } |
| | | return incomeVOS; |
| | |
| | | competitionQuery.setAmount(new BigDecimal(amount)); |
| | | incomeQuery.setAmount(new BigDecimal(amount)); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | // 拿到门店集合id |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())).stream() |
| | | .map(TStore::getId).collect(Collectors.toList()); |
| | | query.setStoresIds(operatorId); |
| | | competitionQuery.setOperatorId(UserExt.getUser().getObjectId()); |
| | | siteBookingQuery.setStoreIds(operatorId); |
| | | } |
| | | |
| | | siteBookingQuery.setTime(time); |
| | | query.setRegisterTime(time); |
| | |
| | | IncomeVO incomeVO = new IncomeVO(); |
| | | List<IncomeVO> incomeVOS = new ArrayList<>(); |
| | | |
| | | if (roleType == 1){ |
| | | if ( incomeType==null || incomeType == 1){ |
| | | // 会员支付记录 |
| | | List<VipPayment> vipPayments = vipPaymentClient.registrationList(incomeQuery); |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | break; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(vipPayment.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(vipPayment.getId()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | temp.setStoreName(""); |
| | | temp.setAmount(new BigDecimal(vipPayment.getAmount().toString())); |
| | | temp.setIncomeType(1); |
| | | temp.setState(vipPayment.getState()); |
| | | temp.setInsertTime(vipPayment.getInsertTime()); |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | break; |
| | | } |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | |
| | | // 充值记录 |
| | | List<RechargeRecordsVO> rechargeRecordsVOS = financeClient.rechargeList(rechargeRecordsQuery); |
| | | for (RechargeRecordsVO rechargeRecordsVO : rechargeRecordsVOS) { |
| | | if (UserExt.getUser().getObjectType()!=1){ |
| | | break; |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(rechargeRecordsVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(rechargeRecordsVO.getId().intValue()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(""); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | temp.setStoreName(""); |
| | | temp.setInsertTime(rechargeRecordsVO.getInsertTime()); |
| | | if (rechargeRecordsVO.getAmount() != null) { |
| | | temp.setAmount(rechargeRecordsVO.getAmount()); |
| | | } |
| | | temp.setIncomeType(2); |
| | | temp.setState(rechargeRecordsVO.getState()); |
| | | temp.setState(rechargeRecordsVO.getPayStatus()); |
| | | |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | |
| | | TAppUser tAppUser = appUserClient.queryById(registerOrderVO.getAppUserId()); |
| | | IncomeVO temp = new IncomeVO(); |
| | | temp.setId(registerOrderVO.getId().intValue()); |
| | | if (registerOrderVO.getPayStatus()==2) { |
| | | temp.setState(2); |
| | | } else { |
| | | temp.setState(1); |
| | | } |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(registerOrderVO.getStoreName()); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | |
| | | temp.setStoreName(registerOrderVO.getStoreName()); |
| | | |
| | | temp.setInsertTime(registerOrderVO.getInsertTime()); |
| | | if (registerOrderVO.getMoney() != null) { |
| | | temp.setAmount(registerOrderVO.getMoney()); |
| | |
| | | if (competition.getPayStatus() == 3) { |
| | | continue; |
| | | } |
| | | IncomeVO temp = new IncomeVO(); |
| | | TAppUser tAppUser = appUserClient.queryById(competition.getAppUserId()); |
| | | Competition competition1 = competitionClient.queryById(competition.getCompetitionId()); |
| | | Store store = storeClient.getStoreById(Integer.valueOf(competition1.getStoreId().split(",")[0])); |
| | | IncomeVO temp = new IncomeVO(); |
| | | if (!competition1.getStoreId().equals("")){ |
| | | String[] split = competition1.getStoreId().split(","); |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (String s : split) { |
| | | list.add(Integer.valueOf(s)); |
| | | } |
| | | List<TStore> id = storeService.list(new QueryWrapper<TStore>().in("id", list)); |
| | | StringBuilder storeNames = new StringBuilder(""); |
| | | for (TStore store : id) { |
| | | // 赛事举办门店 (可能会有多个门店举办 需要拼接门店名称) |
| | | storeNames.append(store.getName() + ","); |
| | | } |
| | | String substring = storeNames.toString().substring(0, storeNames.toString().length() - 1); |
| | | |
| | | temp.setStoreName(substring); |
| | | } |
| | | if (competition.getPayStatus()==2) { |
| | | temp.setState(2); |
| | | } else { |
| | | temp.setState(1); |
| | | } |
| | | temp.setId(competition.getId().intValue()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | temp.setInsertTime(competition.getInsertTime()); |
| | | |
| | | if (competition.getAmount() != null) { |
| | | temp.setAmount(new BigDecimal(competition.getAmount().toString())); |
| | | } |
| | |
| | | } else { |
| | | temp.setState(2); |
| | | } |
| | | TAppUser tAppUser = appUserClient.queryById(siteBooking.getAppUserId()); |
| | | TAppUser tAppUser = appUserClient.queryAppUser1(siteBooking.getAppUserId()); |
| | | Store store = storeClient.getStoreById(siteBooking.getStoreId()); |
| | | |
| | | temp.setId(siteBooking.getId()); |
| | | temp.setProvince(siteBooking.getProvince()); |
| | | temp.setCity(siteBooking.getCity()); |
| | | temp.setStoreName(store.getName()); |
| | | if (tAppUser!=null){ |
| | | if (tAppUser.getProvince()!=null){ |
| | | temp.setProvince(tAppUser.getProvince()); |
| | | } |
| | | if (tAppUser.getCity()!=null){ |
| | | temp.setCity(tAppUser.getCity()); |
| | | } |
| | | temp.setPayUser(tAppUser.getName()); |
| | | temp.setPhone(tAppUser.getPhone()); |
| | | } |
| | | |
| | | temp.setInsertTime(siteBooking.getInsertTime()); |
| | | if (siteBooking.getPayMoney() != null) { |
| | | temp.setAmount(new BigDecimal(siteBooking.getPayMoney().toString())); |
| | |
| | | incomeVOS.add(temp); |
| | | } |
| | | } |
| | | } |
| | | |
| | | BigDecimal totalAmount = BigDecimal.ZERO; // 初始化累加变量为0 |
| | | |
| | | for (IncomeVO vo : incomeVOS) { |
| | | if (vo.getAmount() == null ){ |
| | | BigDecimal temp = BigDecimal.ZERO; |
| | | totalAmount = totalAmount.add(temp); |
| | | }else{ |
| | | BigDecimal totalMoney = vo.getAmount(); |
| | | totalAmount = totalAmount.add(totalMoney); // 累加每个IncomeVO对象的amount |
| | | } |
| | | } |
| | | return totalAmount; |
| | | } |
| | |
| | | /** |
| | | * 获取报名订单记录 |
| | | */ |
| | | @Autowired |
| | | private IStoreService storeService; |
| | | @RequestMapping(value = "/registerListAll") |
| | | @ResponseBody |
| | | public List<RegisterOrderVO> registerListAll(String province,String city,Integer storeId,String registerTime |
| | |
| | | query.setProvince(province); |
| | | query.setCity(city); |
| | | query.setStoreId(storeId); |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | query.setStoresIds(storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",UserExt.getUser().getObjectId()) |
| | | ).stream().map(TStore::getId).collect(Collectors.toList())); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | query.setStoreId(UserExt.getUser().getObjectId()); |
| | | } |
| | |
| | | if (userIds.size()==0){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<RegisterOrderVO> registerOrderVOS = coursePackagePaymentClient.listAllRegister(query); |
| | | |
| | | return registerOrderVOS; |
| | | |
| | | return coursePackagePaymentClient.listAllRegister(query); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | }else { |
| | | // ? |
| | | pointsMerchandise.setShelves(storeId); |
| | | pointsMerchandise.setUseScope(3); |
| | | |
| | | Integer id = pointMercharsClient.add(pointsMerchandise); |
| | | } |
| | | return new SuccessTip<>(); |
| | |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | user.setObjectType(3); |
| | | user.setStatus(1); |
| | | userMapper.insert(user); |
| | | tStore.setStoreStaffId(user.getId()); |
| | | tStore.setLon(lon); |
| | | tStore.setLat(lat); |
| | | tStore.setOperatorId(UserExt.getUser().getObjectId()); |
| | | storeService.save(tStore); |
| | | |
| | | user.setObjectId(tStore.getId()); |
| | | userMapper.insert(user); |
| | | |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | |
| | | integralGoodsOfSearch.setPage(page); |
| | | integralGoodsOfSearch.setObjType(UserExt.getUser().getObjectType()); |
| | | integralGoodsOfSearch.setObjId(UserExt.getUser().getObjectId()); |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | // 查询这个运营商下的所有门店 |
| | | List<Integer> operatorId = storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId", UserExt.getUser().getObjectId())).stream().map(TStore::getId) |
| | | .collect(Collectors.toList()); |
| | | integralGoodsOfSearch.setStoreIds(operatorId); |
| | | } |
| | | return pointMercharsClient.ticketList(integralGoodsOfSearch); |
| | | } |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.common.utils.Md5Utils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.dto.JsDto; |
| | | import com.dsh.course.dto.StudentQeryDto; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.CoachClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.account.model.Coach; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | | import com.dsh.course.feignClient.course.CoursePackageDiscountClient; |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentConfigClient; |
| | |
| | | import com.dsh.course.service.TGameConfigService; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.controller.util.MD5; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.*; |
| | | import com.dsh.guns.modular.system.service.*; |
| | |
| | | |
| | | @Resource |
| | | private CoursePackageClient coursePackageClient; |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | @RequestMapping("/tolist") |
| | | public String tolist(Model model) { |
| | |
| | | |
| | | return new ResultUtil<>(0,0,"到店成功",null,null); |
| | | } |
| | | |
| | | @RequestMapping("/confirm/{id}") |
| | | @ResponseBody |
| | | public ResultUtil confirm(@PathVariable("id") Integer id) { |
| | | |
| | | System.out.println("============"+id); |
| | | SiteBooking siteBooking = new SiteBooking(); |
| | | siteBooking.setId(id); |
| | | siteBooking.setStatus(1); |
| | | iSiteBookingService.updateById(siteBooking); |
| | | |
| | | return new ResultUtil<>(0,0,"手动支付成功",null,null); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取变更列表 |
| | |
| | | System.out.println("是否超过当前日期"+isAfterCurrentDate); |
| | | String currentTime = appointmentStartTime; |
| | | while (currentTime.compareTo(appointmentEndTime) < 0) { |
| | | String nextTime = getNextTime(currentTime); |
| | | String nextTime = null; |
| | | if("智慧场地".equals(site.getTypeName())){ |
| | | nextTime=getNextTimeOne(currentTime); |
| | | }else { |
| | | nextTime= getNextTime(currentTime); |
| | | } |
| | | |
| | | |
| | | String timeRange = currentTime + "-" + nextTime; |
| | |
| | | model.addAttribute("city", list1); |
| | | String code1 = list1.get(0).get("code").toString(); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | list2=storeService.list(new QueryWrapper<TStore>().eq("id", UserExt.getUser().getObjectId()).eq("state", 1)); |
| | | } |
| | | model.addAttribute("store", list2); |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | | model.addAttribute("objType", UserExt.getUser().getObjectType()); |
| | | |
| | | |
| | | return PREFIX+"yuyue_edit.html"; |
| | |
| | | |
| | | String currentTime = appointmentStartTime; |
| | | while (currentTime.compareTo(appointmentEndTime) < 0) { |
| | | String nextTime = getNextTime(currentTime); |
| | | String nextTime = null; |
| | | if("智慧场地".equals(site.getTypeName())){ |
| | | nextTime=getNextTimeOne(currentTime); |
| | | }else { |
| | | nextTime= getNextTime(currentTime); |
| | | } |
| | | // String nextTime = getNextTime(currentTime); |
| | | |
| | | |
| | | String timeRange = currentTime + "-" + nextTime; |
| | |
| | | |
| | | return String.format("%02d:%02d", hour, minute); |
| | | |
| | | // String[] parts = currentTime.split(":"); |
| | | // int hour = Integer.parseInt(parts[0]); |
| | | // int minute = Integer.parseInt(parts[1]); |
| | | // |
| | | // if (minute == 45) { |
| | | // hour++; |
| | | // minute = 0; |
| | | // } else if (minute == 0){ |
| | | // minute = 15; |
| | | // }else if (minute == 15){ |
| | | // minute = 30; |
| | | // }else if (minute == 30){ |
| | | // minute = 45; |
| | | // } |
| | | // |
| | | // return String.format("%02d:%02d", hour, minute); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public static String getNextTimeOne(String currentTime) { |
| | | |
| | | String[] parts = currentTime.split(":"); |
| | | int hour = Integer.parseInt(parts[0]); |
| | | int minute = Integer.parseInt(parts[1]); |
| | | |
| | | if (minute == 45) { |
| | | hour++; |
| | | minute = 0; |
| | | } else if (minute == 0){ |
| | | minute = 15; |
| | | }else if (minute == 15){ |
| | | minute = 30; |
| | | }else if (minute == 30){ |
| | | minute = 45; |
| | | } |
| | | |
| | | return String.format("%02d:%02d", hour, minute); |
| | | |
| | | } |
| | | |
| | | |
| | | @RequestMapping("/halfName/{id}") |
| | |
| | | List<Map<String, Object>> list1 = storeService.queryCity(code.toString(), cityCode); |
| | | model.addAttribute("city", list1); |
| | | String code1 = list1.get(0).get("code").toString(); |
| | | List<TStore> list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | List<TStore> list2 =new ArrayList<>(); |
| | | if(objectType==3){ |
| | | list2 = storeService.list(new QueryWrapper<TStore>().eq("id", objectId).eq("state", 1)); |
| | | }else { |
| | | list2 = storeService.list(new QueryWrapper<TStore>().eq("cityCode", code1).eq("state", 1)); |
| | | } |
| | | model.addAttribute("store", list2); |
| | | |
| | | TStore store = list2.get(0); |
| | | List<TSite> list3 = siteService.list(new QueryWrapper<TSite>().eq("storeId", store.getId()).eq("state", 1)); |
| | | model.addAttribute("site", list3); |
| | |
| | | siteBooking.setInsertTime(new Date()); |
| | | siteBooking.setState(1); |
| | | siteBooking.setStatus(0); |
| | | // 查询当前预约人是否是会员 |
| | | String phone = siteBooking.getPhone(); |
| | | String booker = siteBooking.getBooker(); |
| | | TAppUser appUserByPhone = appUserClient.getAppUserByPhone(phone); |
| | | TStore byId1 = storeService.getById(siteBooking.getStoreId()); |
| | | |
| | | if (appUserByPhone== null){ |
| | | // 则当前预约人不是会员 添加到会员表里 |
| | | TAppUser tAppUser = new TAppUser(); |
| | | tAppUser.setName(booker); |
| | | tAppUser.setPhone(phone); |
| | | tAppUser.setProvince(byId1.getProvince()); |
| | | tAppUser.setProvinceCode(byId1.getProvinceCode()); |
| | | tAppUser.setCity(byId1.getCity()); |
| | | tAppUser.setCityCode(byId1.getCityCode()); |
| | | tAppUser.setIsVip(0); |
| | | tAppUser.setInsertType(UserExt.getUser().getObjectType()); |
| | | tAppUser.setAddUserId(UserExt.getUser().getObjectId()); |
| | | tAppUser.setInsertTime(new Date()); |
| | | tAppUser.setPassword(MD5.md5("111111")); |
| | | appUserClient.addAppUser1(tAppUser); |
| | | }else{ |
| | | siteBooking.setAppUserId(appUserByPhone.getId()); |
| | | } |
| | | // 如果是运营商添加的话 根据门店的省市来存储 |
| | | if (UserExt.getUser().getObjectType() == 2){ |
| | | TStore byId = storeService.getById(siteBooking.getStoreId()); |
| | |
| | | siteBooking.setCity(byId.getCity()); |
| | | siteBooking.setCityCode(byId.getCityCode()); |
| | | } |
| | | |
| | | siteClient.addSiteBooking(siteBooking); |
| | | System.out.println("================="+siteBooking); |
| | | return new ResultUtil<>(null,200,null,null,null); |
| | |
| | | @ResponseBody |
| | | public List<ZTreeNode> tree() { |
| | | List<ZTreeNode> tree = this.deptService.tree(); |
| | | |
| | | tree.add(ZTreeNode.createParent()); |
| | | return tree; |
| | | } |
| | |
| | | } |
| | | //完善pids,根据pid拿到pid的pids |
| | | deptSetPids(dept); |
| | | |
| | | dept.setObjectType(UserExt.getUser().getObjectType()); |
| | | dept.setObjectId(UserExt.getUser().getObjectId()); |
| | | |
| | | return this.deptService.save(dept); |
| | | } |
| | |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL); |
| | | } |
| | | role.setId(null); |
| | | role.setObjType(UserExt.getUser().getObjectType()); |
| | | role.setObjId(UserExt.getUser().getObjectId()); |
| | | this.roleService.save(role); |
| | | |
| | | |
| | |
| | | @RequestMapping(value = "/roleTreeList") |
| | | @ResponseBody |
| | | public List<ZTreeNode> roleTreeList() { |
| | | List<ZTreeNode> roleTreeList = this.roleService.roleTreeList(); |
| | | List<ZTreeNode> roleTreeList = this.roleService.roleTreeList(UserExt.getUser().getObjectType(),UserExt.getUser().getObjectId()); |
| | | roleTreeList.add(ZTreeNode.createParent()); |
| | | return roleTreeList; |
| | | } |
| | |
| | | public List<ZTreeNode> roleTreeListByUserId(@PathVariable Integer userId) { |
| | | User theUser = this.userService.getById(userId); |
| | | String roleid = theUser.getRoleid(); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | if (Objects.isNull(roleid)) { |
| | | List<ZTreeNode> roleTreeList = this.roleService.roleTreeList(); |
| | | List<ZTreeNode> roleTreeList = this.roleService.roleTreeList(objectType,objectId); |
| | | return roleTreeList; |
| | | } else { |
| | | String[] strArray = Convert.toStrArray(",", roleid); |
| | | List<ZTreeNode> roleTreeListByUserId = this.roleService.roleTreeListByRoleId(strArray); |
| | | List<ZTreeNode> roleTreeListByUserId = this.roleService.roleTreeListByRoleId(strArray,objectType,objectId); |
| | | return roleTreeListByUserId; |
| | | } |
| | | } |
| | |
| | | user.setCreatetime(new Date()); |
| | | |
| | | User objectUser = UserFactory.createUser(user); |
| | | objectUser.setObjectType(UserExt.getUser().getObjectType()); |
| | | objectUser.setObjectId(UserExt.getUser().getObjectId()); |
| | | //查找平台所属公司 |
| | | //Search for the company that owns the platform. |
| | | this.userService.save(objectUser); |
| | |
| | | * 门店列表 |
| | | */ |
| | | String storeIds; |
| | | |
| | | Integer objType; |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | |
| | | */ |
| | | private Integer version; |
| | | |
| | | @TableField("objectType") |
| | | private Integer objectType; |
| | | @TableField("objectId") |
| | | private Integer objectId; |
| | | |
| | | public Integer getObjectType() { |
| | | return objectType; |
| | | } |
| | | |
| | | public void setObjectType(Integer objectType) { |
| | | this.objectType = objectType; |
| | | } |
| | | |
| | | public Integer getObjectId() { |
| | | return objectId; |
| | | } |
| | | |
| | | public void setObjectId(Integer objectId) { |
| | | this.objectId = objectId; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
New file |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("t_operator_auth") |
| | | public class OperatorAuth { |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @TableField(value = "operatorId") |
| | | private Integer operatorId; |
| | | @TableField(value = "bodyType") |
| | | private String bodyType; |
| | | @TableField(value = "type") |
| | | private Integer type; |
| | | @TableField(value = "businessName") |
| | | private String businessName; |
| | | @TableField(value = "businessNumber") |
| | | private String businessNumber; |
| | | @TableField(value = "legalRepresentative") |
| | | private String legalRepresentative; |
| | | @TableField(value = "registerAddress") |
| | | private String registerAddress; |
| | | @TableField(value = "businessTerm") |
| | | private String businessTerm; |
| | | @TableField(value = "businessPicture") |
| | | private String businessPicture; |
| | | @TableField(value = "legalPerson") |
| | | private String legalPerson; |
| | | @TableField(value = "leagleNumber") |
| | | private String leagleNumber; |
| | | @TableField(value = "legalPhone") |
| | | private String legalPhone; |
| | | @TableField(value = "legalEmail") |
| | | private String legalEmail; |
| | | @TableField(value = "legalTerm") |
| | | private String legalTerm; |
| | | @TableField(value = "legalAddress") |
| | | private String legalAddress; |
| | | @TableField(value = "legalFront") |
| | | private String legalFront; |
| | | @TableField(value = "legalBack") |
| | | private String legalBack; |
| | | @TableField(value = "accountType") |
| | | private Integer accountType; |
| | | @TableField(value = "bank") |
| | | private String bank; |
| | | @TableField(value = "accountName") |
| | | private String accountName; |
| | | @TableField(value = "province") |
| | | private String province; |
| | | @TableField(value = "provinceCode") |
| | | private String provinceCode; |
| | | @TableField(value = "city") |
| | | private String city; |
| | | @TableField(value = "cityCode") |
| | | private String cityCode; |
| | | @TableField(value = "bankName") |
| | | private String bankName; |
| | | @TableField(value = "bankNumber") |
| | | private String bankNumber; |
| | | @TableField(value = "auditState") |
| | | private Integer auditState; |
| | | @TableField(value = "isBeneficiary") |
| | | private String isBeneficiary; |
| | | @TableField(value = "beneficiary") |
| | | private String beneficiary; |
| | | @TableField(value = "beneficiaryNumber") |
| | | private String beneficiaryNumber; |
| | | @TableField(value = "beneficiaryAddress") |
| | | private String beneficiaryAddress; |
| | | @TableField(value = "beneficiaryTerm") |
| | | private String beneficiaryTerm; |
| | | @TableField(value = "beneficiaryFront") |
| | | private String beneficiaryFront; |
| | | @TableField(value = "beneficiaryBack") |
| | | private String beneficiaryBack; |
| | | @TableField(value = "refuseReason") |
| | | private String refuseReason; |
| | | |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | @TableField(value = "outBizNo") |
| | | private String outBizNo; |
| | | @TableField(value = "name") |
| | | private String name; |
| | | @TableField(value = "phone") |
| | | private String phone; |
| | | @TableField(value = "number") |
| | | private String number; |
| | | @TableField(value = "businessEnd") |
| | | private String businessEnd; |
| | | @TableField(value = "legalEnd") |
| | | private String legalEnd; |
| | | @TableField(value = "beneficiaryEnd") |
| | | private String beneficiaryEnd; |
| | | @TableField(value = "orderNo") |
| | | private String orderNo; |
| | | @TableField(value = "orderStatus") |
| | | private String orderStatus; |
| | | |
| | | } |
| | |
| | | package com.dsh.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | |
| | | */ |
| | | private Integer version; |
| | | |
| | | @TableField("objType") |
| | | private Integer objType; |
| | | @TableField("objId") |
| | | private Integer objId; |
| | | |
| | | public Integer getObjType() { |
| | | return objType; |
| | | } |
| | | |
| | | public void setObjType(Integer objType) { |
| | | this.objType = objType; |
| | | } |
| | | |
| | | public Integer getObjId() { |
| | | return objId; |
| | | } |
| | | |
| | | public void setObjId(Integer objId) { |
| | | this.objId = objId; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
New file |
| | |
| | | package com.dsh.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.dsh.guns.modular.system.model.OperatorAuth; |
| | | import com.dsh.guns.modular.system.model.TSite; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:49 |
| | | */ |
| | | public interface IOperatorAuthService extends IService<OperatorAuth> { |
| | | } |
| | |
| | | * @return |
| | | * @date 2017年2月18日 上午10:32:04 |
| | | */ |
| | | List<ZTreeNode> roleTreeList(); |
| | | List<ZTreeNode> roleTreeList(Integer type,Integer id); |
| | | |
| | | /** |
| | | * 获取角色列表树 |
| | |
| | | * @return |
| | | * @date 2017年2月18日 上午10:32:04 |
| | | */ |
| | | List<ZTreeNode> roleTreeListByRoleId(String[] roleId); |
| | | List<ZTreeNode> roleTreeListByRoleId(String[] roleId,Integer type,Integer id); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.DeptMapper; |
| | | import com.dsh.course.model.node.ZTreeNode; |
| | | import com.dsh.guns.config.UserExt; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<ZTreeNode> tree() { |
| | | return this.baseMapper.tree(); |
| | | |
| | | return this.baseMapper.tree(UserExt.getUser().getObjectType(),UserExt.getUser().getObjectId()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> list(String condition) { |
| | | return this.baseMapper.list(condition); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | return this.baseMapper.list(condition,objectType,objectId); |
| | | } |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.MenuMapper; |
| | | import com.dsh.course.model.node.MenuNode; |
| | | import com.dsh.course.model.node.ZTreeNode; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.model.Relation; |
| | | import com.dsh.guns.modular.system.service.IRelationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.dsh.guns.modular.system.model.Menu; |
| | |
| | | return this.baseMapper.getMenuIdsByRoleId(roleId); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private IRelationService relationService; |
| | | @Override |
| | | public List<ZTreeNode> menuTreeList() { |
| | | return this.baseMapper.menuTreeList(); |
| | | List<ZTreeNode> zTreeNodes = this.baseMapper.menuTreeList(); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | List<Relation> list = relationService.list(new LambdaQueryWrapper<Relation>().eq(Relation::getRoleid, 3)); |
| | | List<Long> collect = list.stream().map(Relation::getMenuid).collect(Collectors.toList()); |
| | | zTreeNodes= zTreeNodes.stream().filter(e -> collect.contains(e.getId())).collect(Collectors.toList()); |
| | | } |
| | | return zTreeNodes; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.dsh.course.mapper.RelationMapper; |
| | | import com.dsh.course.mapper.RoleMapper; |
| | | import com.dsh.course.model.node.ZTreeNode; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.modular.system.controller.util.Convert; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> selectRoles(String condition) { |
| | | return this.baseMapper.selectRoles(condition); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | return this.baseMapper.selectRoles(condition,objectType,objectId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ZTreeNode> roleTreeList() { |
| | | return this.baseMapper.roleTreeList(); |
| | | public List<ZTreeNode> roleTreeList(Integer type,Integer id) { |
| | | return this.baseMapper.roleTreeList(type,id); |
| | | } |
| | | |
| | | @Override |
| | | public List<ZTreeNode> roleTreeListByRoleId(String[] roleId) { |
| | | return this.baseMapper.roleTreeListByRoleId(roleId); |
| | | public List<ZTreeNode> roleTreeListByRoleId(String[] roleId,Integer type,Integer id) { |
| | | return this.baseMapper.roleTreeListByRoleId(roleId,type,id); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dsh.guns.modular.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.TOperatorAuthMapper; |
| | | import com.dsh.course.mapper.TTurnMapper; |
| | | import com.dsh.guns.modular.system.model.OperatorAuth; |
| | | import com.dsh.guns.modular.system.model.TTurn; |
| | | import com.dsh.guns.modular.system.service.IOperatorAuthService; |
| | | import com.dsh.guns.modular.system.service.TTurnService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2023-09-19 |
| | | */ |
| | | @Service |
| | | public class TOperatorAuthServiceImpl extends ServiceImpl<TOperatorAuthMapper, OperatorAuth> implements IOperatorAuthService { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.dataScope.DataScope; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getUserListPage(Page<Map<String, Object>> page, DataScope dataScope, String name, String beginTime, String endTime, Integer deptid) { |
| | | List<Map<String, Object>> userListPage = this.baseMapper.getUserListPage(page, dataScope, name, beginTime, endTime, deptid); |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | Integer objectId = UserExt.getUser().getObjectId(); |
| | | |
| | | List<Map<String, Object>> userListPage = this.baseMapper.getUserListPage(page, dataScope, name, beginTime, endTime, deptid,objectType,objectId); |
| | | return userListPage; |
| | | } |
| | | } |
| | |
| | | ELSE |
| | | 'false' |
| | | END |
| | | ) as isOpen from sys_dept |
| | | ) as isOpen from sys_dept where 1=1 |
| | | <if test="type ==3 "> |
| | | and objectType =3 and objectId =#{id} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="list" resultType="map"> |
| | | select * from sys_dept |
| | | select * from sys_dept where 1=1 |
| | | <if test="condition != null and condition != ''"> |
| | | where simplename like CONCAT('%',#{condition},'%') or fullname like CONCAT('%',#{condition},'%') |
| | | and simplename like CONCAT('%',#{condition},'%') or fullname like CONCAT('%',#{condition},'%') |
| | | </if> |
| | | <if test="objectType == 3"> |
| | | and objectType = 3 and objectId =#{objectId} |
| | | </if> |
| | | order by num ASC |
| | | </select> |
| | |
| | | |
| | | <select id="selectRoles" resultType="map"> |
| | | select rr.*,(SELECT COUNT(id) from sys_user where FIND_IN_SET(rr.id,roleid)) as userCount |
| | | from sys_role as rr |
| | | from sys_role as rr where 1=1 |
| | | <if test="condition != null"> |
| | | where rr.name like CONCAT('%',#{condition},'%') |
| | | and rr.name like CONCAT('%',#{condition},'%') |
| | | </if> |
| | | <if test="objectType == 3"> |
| | | and rr.objType =3 and rr.objId =#{objectId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <select id="roleTreeList" resultType="com.dsh.course.model.node.ZTreeNode"> |
| | | select id "id",pId |
| | | "pId",name as "name",(case when (pId=0 or pId is null) then 'true' |
| | | else 'false' end) "open" from sys_role |
| | | else 'false' end) "open" from sys_role where 1=1 |
| | | <if test="type==3"> |
| | | and objType =3 and objId =#{id} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="roleTreeListByRoleId" resultType="com.dsh.course.model.node.ZTreeNode"> |
| | |
| | | sys_role |
| | | WHERE |
| | | ID IN |
| | | |
| | | <foreach collection="array" index="index" item="i" open="(" separator="," close=")"> |
| | | #{i} |
| | | </foreach> |
| | | |
| | | <if test="type==3"> |
| | | and objType =3 and objId =#{id} |
| | | </if> |
| | | ) r1 ON r.ID = r1.ID |
| | | ORDER BY |
| | | pId, |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dsh.course.mapper.TOperatorAuthMapper"> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | and (o.createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="objectType ==3"> |
| | | and (o.objectType =3 and o.objectId =#{objectId}) |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | |
| | | |
| | | <#button name="修改" icon="fa-edit" clickFun="TStudent.openTStudentDetail()" space="true"/> |
| | | <#button name="确认到店" icon="fa-edit" clickFun="TStudent.openTStudentDetail1()" space="true"/> |
| | | <#button name="取消凭证" icon="fa-edit" clickFun="TStudent.openTStudentDetail4()" space="true"/> |
| | | <#button name="取消预约" icon="fa-edit" clickFun="TStudent.openTStudentDetail4()" space="true"/> |
| | | <#button name="手动支付" icon="fa-edit" clickFun="TStudent.openTStudentDetail6()" space="true"/> |
| | | |
| | | <#button name="查看详情" icon="fa-edit" clickFun="TStudent.openTStudentDetail5()" space="true"/> |
| | | |
| | |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | @if(objType !=3){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所在省:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*所属门店:</label> |
| | | <div class="col-sm-4"> |
| | |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="carInfoForm"> |
| | | <h2>商户信息</h2> |
| | | <div style="display: flex"> |
| | | <span id="storeName"></span> |
| | | <span id="storeStaff"></span> |
| | | <span id="storePhone"></span> |
| | | </div> |
| | | <h2>商户号信息</h2> |
| | | </br> |
| | | </br> |
| | | <input hidden id="id" value="${id}"> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <input id="operatorId" value="${operatorId}" hidden> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*支付宝认证类型:</label> |
| | | <label class="col-sm-4 control-label" > |
| | | 主题类型:<input checked type="radio" name="bodyType" value="IND_BIZ" onclick="updateHalf(1)">个人 |
| | | <input type="radio" name="bodyType" value="ENTERPRISE" onclick="updateHalf(2)">企业 |
| | | </label> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*联系人姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="alipayType" value="1" checked>个人 |
| | | <input type="radio" name="alipayType" value="2" >企业 |
| | | <input style="width: 300px" class="form-control" id="name" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*支付宝商户号:</label> |
| | | <label class="col-sm-3 control-label">*联系人电话:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="alipayNum" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*微信认证类型:</label> |
| | | <div class="col-sm-9"> |
| | | <input type="radio" name="wechatType" value="1" checked>个人 |
| | | <input type="radio" name="wechatType" value="2" >企业 |
| | | <input style="width: 300px" class="form-control" id="phone" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*微信商户号:</label> |
| | | <label class="col-sm-3 control-label">*联系人身份证号:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="wechatNum" placeholder="请输入" type="text"> |
| | | <input style="width: 300px" class="form-control" id="number" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法定代表人姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lrName" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*营业执照商户名称:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="merchantName" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*营业证照生效时间:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="tradeTime" name="tradeTime" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*营业证照过期时间:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="endTime" name="endTime" type="date"> |
| | | <input type="checkbox" style="margin-left: 10px" id="tradeE" value="0" onchange="TSite.tradeYse(this)">长期</input> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*营业执照注册号:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="licenseRegistration" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*注册地址:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="registerAddress" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="license" name="营业执照" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人姓名:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="legalPerson" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人手机号:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="legalPhone" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*法人身份证开始时间:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="IDCardTime" name="IDCardTime" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*法人身份证结束时间:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="IDCardEnd" name="IDCardTime" type="date"> |
| | | <input type="checkbox" style="margin-left: 10px" id="IDCardE" value="0" onchange="TSite.tradeYse(this)">长期</input> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="IDCardImg" name="法人身份证正面照" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*法人身份证号:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lIDNumber" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人邮箱:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lEmail" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" > |
| | | <label class="col-sm-3 control-label">*法人身份证地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="lIDAddress" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="IDCardImg1" name="法人身份证背面照" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <div class="row" id="benefit"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label" > |
| | | 法人是否为受益人:<input type="radio" checked name="type" value="true">是 <input checked type="radio" name="type" value="false">否 |
| | | </label> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="bName" name="bName" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证地址:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="bAddress" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证有效期:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="bTime" name="bTime" type="date"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证结束时间:</label> |
| | | <div class="col-sm-9" style="display: flex"> |
| | | <input style="width: 300px" class="form-control" id="bEnd" name="IDCardTime" type="date"> |
| | | <input type="checkbox" style="margin-left: 10px" id="bIDCardT" value="0" onchange="TSite.tradeYse(this)">长期</input> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="bImg1" name="受益人身份证正面照" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*受益人身份证号:</label> |
| | | <div class="col-sm-9" > |
| | | <input style="width: 300px" class="form-control" id="bIDNumber" placeholder="请输入" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="bImg2" name="受益人身份证背面照" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-lg-6" style=""> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*拒绝理由:</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <#avatar id="Img" name="上传图片" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*备注:</label> |
| | | <div class="col-sm-9"> |
| | | <input style="width: 300px" class="form-control" id="remark" name="remark" type="text"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5" > |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="${ctxPath}/modular/system/operator/operator.js"></script> |
| | | <script src="${ctxPath}/modular/system/operatorUser/operatorUser.js"></script> |
| | | <script src="${ctxPath}/js/vue/vue.js"></script> |
| | | <script src="${ctxPath}/js/elementui/index.js"></script> |
| | | <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#tradeTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#IDCardTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#bTime' |
| | | ,range: true |
| | | ,lang:"CN" |
| | | }); |
| | | function updateHalf(e) { |
| | | if(e==1){ |
| | | $("#benefit").hide() |
| | |
| | | <input hidden id="two" value="${two}"> |
| | | <input hidden id="three" value="${three}"> |
| | | <input hidden id="city" value="${city}"> |
| | | <input hidden id="objectType" value="${objectType}"> |
| | | <div class="form-horizontal"> |
| | | <div class="row"> |
| | | <div class="col-sm-6"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | @if(objectType == 1){ |
| | | |
| | | |
| | | <div class="row" id="exchangeType" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | @} |
| | | <div class="row" id="needIntegral" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | |
| | | placeholder="请选择"/> |
| | | </div> |
| | | </div> |
| | | |
| | | @if(objectType == 1){ |
| | | <div class="row" id="app" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | @} |
| | | <div class="row" id="belongsCon" > |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | |
| | | 跳转类型 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="type" style="width: 400px;" > |
| | | <select class="form-control" id="type" style="width: 400px;" onchange="updateT(this)" > |
| | | |
| | | </select> |
| | | </div> |
| | |
| | | elem: '#time', |
| | | range:true |
| | | }); |
| | | |
| | | |
| | | |
| | | function updateT(e) { |
| | | var oneId = $('#type option:selected').text(); |
| | | console.log(oneId); |
| | | if (oneId!="详情"){ |
| | | $("#t3").hide() |
| | | }else{ |
| | | $("#t3").show() |
| | | } |
| | | } |
| | | |
| | | function updateType(e) { |
| | | let name = $("#name").val() |
| | |
| | | }); |
| | | ajax.set("id",oneId); |
| | | ajax.start(); |
| | | |
| | | updateT(document.getElementById("type")); |
| | | |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | } |
| | | }; |
| | | |
| | | |
| | | TStudent.openTStudentDetail6 = function () { |
| | | if (this.check()) { |
| | | |
| | | if (TStudent.seItem.status!=0){ |
| | | Feng.error("请选择待支付的数据") |
| | | return |
| | | } |
| | | |
| | | |
| | | parent.layer.confirm("是否手动支付" , { |
| | | btn: ['确定', '取消'] |
| | | }, function (index) { |
| | | let ajax = new $ax(Feng.ctxPath + "/ball/confirm/"+TStudent.seItem.id, function (data) { |
| | | Feng.success("手动支付" + "成功!"); |
| | | TStudent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error(state == 1 ? '手动支付' : "下架" + "失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.start(); |
| | | parent.layer.close(index); |
| | | |
| | | }, function (index) { |
| | | parent.layer.close(index); |
| | | } |
| | | |
| | | |
| | | ) |
| | | // var index = layer.open({ |
| | | // type: 2, |
| | | // title: '', |
| | | // area: ['30%', '40%'], //宽高 |
| | | // fix: false, //不固定 |
| | | // maxmin: true, |
| | | // content: Feng.ctxPath + '/ball/tocancel/' + TStudent.seItem.id |
| | | // }); |
| | | // |
| | | // this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | TStudent.openTStudentDetail2 = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | |
| | | }, |
| | | ]; |
| | | }; |
| | | TSite.addSubmit = function(){ |
| | | |
| | | var bodyType = $("input[name='bodyType']:checked").val(); |
| | | var type = $("input[name='type']:checked").val(); |
| | | if (bodyType=="" || null == type){ |
| | | Feng.error("请选择主体类型"); |
| | | return; |
| | | } |
| | | if ("" == $("#name").val() || null == $("#name").val()){ |
| | | Feng.error("请输入联系人姓名"); |
| | | return; |
| | | } |
| | | if ("" == $("#phone").val() || null == $("#phone").val()){ |
| | | Feng.error("请输入联系人电话"); |
| | | return; |
| | | } |
| | | if ("" == $("#number").val() || null == $("#number").val()){ |
| | | Feng.error("请输入联系人身份证号"); |
| | | return; |
| | | } |
| | | var platform = $("input[name='platform']:checked").val(); |
| | | |
| | | if ("" == $("#merchantName").val() || null == $("#merchantName").val()){ |
| | | Feng.error("请输入营业执照商户名称"); |
| | | return; |
| | | } |
| | | if ("" == $("#lrName").val() || null == $("#lrName").val()){ |
| | | Feng.error("请输入法定代表人姓名"); |
| | | return; |
| | | } |
| | | var tradeT = document.getElementById("tradeE"); |
| | | if (!tradeT.checked){ |
| | | if ("" == $("#endTime").val() || null == $("#endTime").val()){ |
| | | Feng.error("请输入营业证照过期时间"); |
| | | return; |
| | | } |
| | | } |
| | | if ("" == $("#tradeTime").val() || null == $("#tradeTime").val()){ |
| | | Feng.error("请输入营业执照生效期间"); |
| | | return; |
| | | } |
| | | if ("" == $("#licenseRegistration").val() || null == $("#licenseRegistration").val()){ |
| | | Feng.error("请输入营业执照注册号"); |
| | | return; |
| | | } |
| | | if ("" == $("#registerAddress").val() || null == $("#registerAddress").val()){ |
| | | Feng.error("请输入注册地址"); |
| | | return; |
| | | } |
| | | if ("" == $("#license").val() || null == $("#license").val()){ |
| | | Feng.error("请上传营业执照"); |
| | | return; |
| | | }if ("" == $("#legalPerson").val() || null == $("#legalPerson").val()){ |
| | | Feng.error("请输入法人姓名"); |
| | | return; |
| | | }if ("" == $("#legalPhone").val() || null == $("#legalPhone").val()){ |
| | | Feng.error("请输入法人手机号"); |
| | | return; |
| | | } |
| | | var IDCardT = document.getElementById("IDCardE"); |
| | | if (!IDCardT.checked){ |
| | | if ("" == $("#IDCardTime").val() || null == $("#IDCardTime").val()){ |
| | | Feng.error("请输入法人身份证结束时间"); |
| | | return; |
| | | } |
| | | } |
| | | if ("" == $("#IDCardTime").val() || null == $("#IDCardTime").val()){ |
| | | Feng.error("请输入法人身份证开始时间"); |
| | | return; |
| | | } |
| | | |
| | | if ("" == $("#IDCardImg").val() || null == $("#IDCardImg").val()){ |
| | | Feng.error("请上传法人身份证正面照"); |
| | | return; |
| | | }if ("" == $("#lIDNumber").val() || null == $("#lIDNumber").val()){ |
| | | Feng.error("请输入法人身份证号"); |
| | | return; |
| | | }if ("" == $("#lEmail").val() || null == $("#lEmail").val()){ |
| | | Feng.error("请输入法人邮箱"); |
| | | return; |
| | | }if ("" == $("#lIDAddress").val() || null == $("#lIDAddress").val()){ |
| | | Feng.error("请输入法人身份证地址"); |
| | | return; |
| | | }if ("" == $("#IDCardImg1").val() || null == $("#IDCardImg1").val()){ |
| | | Feng.error("请上传法人身份证背面照"); |
| | | return; |
| | | } |
| | | |
| | | if(type=="ENTERPRISE"){ |
| | | if ("" == $("#bName").val() || null == $("#bName").val()){ |
| | | Feng.error("请输入受益人姓名"); |
| | | return; |
| | | }if ("" == $("#bPhone").val() || null == $("#bPhone").val()){ |
| | | Feng.error("请输入受益人手机号"); |
| | | return; |
| | | }if ("" == $("#bAddress").val() || null == $("#bAddress").val()){ |
| | | Feng.error("请输入受益人身份证地址"); |
| | | return; |
| | | } |
| | | var bIDCardT = document.getElementById("bIDCardT"); |
| | | if (!bIDCardT.checked){ |
| | | if ("" == $("#bEnd").val() || null == $("#bEnd").val()){ |
| | | Feng.error("请输入受益人身份证结束时间"); |
| | | return; |
| | | } |
| | | } |
| | | if ("" == $("#bTime").val() || null == $("#bTime").val()){ |
| | | Feng.error("请输入受益人身份证开始时间"); |
| | | return; |
| | | } |
| | | if ("" == $("#bImg1").val() || null == $("#bImg1").val()){ |
| | | Feng.error("请上传受益人身份证正面照"); |
| | | return; |
| | | } |
| | | if ("" == $("#bIDNumber").val() || null == $("#bIDNumber").val()){ |
| | | Feng.error("请输入受益人身份证号"); |
| | | return; |
| | | } |
| | | if ("" == $("#bImg2").val() || null == $("#bImg2").val()){ |
| | | Feng.error("请输入受益人身份证背面照"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/operator/auth", function(data){ |
| | | Feng.success("操作成功!"); |
| | | // window.parent.TSite.table.refresh(); |
| | | // TSite.close(); |
| | | },function(data){ |
| | | Feng.error("操作失败!"); |
| | | }); |
| | | ajax.set("operatorId", $("#id").val() ); |
| | | ajax.set("bodyType", bodyType ); |
| | | ajax.set("type", platform ); |
| | | ajax.set("businessName", $("#merchantName").val() ); |
| | | ajax.set("businessNumber", $("#licenseRegistration").val() ); |
| | | ajax.set("legalRepresentative", $("#lrName").val() ); |
| | | ajax.set("registerAddress", $("#registerAddress").val() ); |
| | | if ($("#endTime").val()==""){ |
| | | ajax.set("businessEnd","forever"); |
| | | }else{ |
| | | ajax.set("businessEnd",$("#endTime").val()); |
| | | } |
| | | if ($("#IDCardEnd").val()==""){ |
| | | ajax.set("legalEnd","forever"); |
| | | }else{ |
| | | ajax.set("legalEnd",$("#IDCardEnd").val()); |
| | | } |
| | | |
| | | if(bodyType=="ENTERPRISE"){ |
| | | if ($("#bEnd").val()==""){ |
| | | console.log("永远") |
| | | ajax.set("beneficiaryEnd","forever"); |
| | | }else{ |
| | | console.log("嗯嗯嗯") |
| | | ajax.set("beneficiaryEnd",$("#bEnd").val()); |
| | | } |
| | | } |
| | | ajax.set("businessTerm", $("#tradeTime").val() ); |
| | | ajax.set("name", $("#name").val() ); |
| | | ajax.set("phone", $("#phone").val() ); |
| | | ajax.set("number", $("#number").val() ); |
| | | ajax.set("businessPicture", $("#license").val() ); |
| | | ajax.set("legalPerson", $("#legalPerson").val() ); |
| | | ajax.set("legalNumber", $("#lIDNumber").val() ); |
| | | ajax.set("legalPhone", $("#legalPhone").val() ); |
| | | ajax.set("legalEmail", $("#lEmail").val() ); |
| | | ajax.set("legalTerm", $("#IDCardTime").val() ); |
| | | ajax.set("legalAddress", $("#lIDAddress").val() ); |
| | | ajax.set("legalFront", $("#IDCardImg").val() ); |
| | | ajax.set("legalBack", $("#IDCardImg1").val() ); |
| | | ajax.set("isBeneficiary", type ); |
| | | ajax.set("beneficiary", $("#bName").val() ); |
| | | ajax.set("beneficiaryPhone", $("#bPhone").val() ); |
| | | ajax.set("beneficiaryNumber", $("#bIDNumber").val() ); |
| | | ajax.set("beneficiaryAddress", $("#bAddress").val() ); |
| | | ajax.set("beneficiaryTerm", $("#bTime").val() ); |
| | | ajax.set("beneficiaryFront", $("#bImg1").val() ); |
| | | ajax.set("beneficiaryBack", $("#bImg2").val() ); |
| | | ajax.set("remark", $("#remark").val() ); |
| | | ajax.start(); |
| | | }; |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | |
| | | TSite.search(); |
| | | }; |
| | | TSite.tradeYse = function () { |
| | | var tradeT = document.getElementById('tradeT'); |
| | | var IDCardT = document.getElementById('IDCardT'); |
| | | |
| | | var tradeT = document.getElementById('tradeE'); |
| | | var endTime = document.getElementById('endTime'); |
| | | var IDCardT = document.getElementById('IDCardE'); |
| | | var bIDCardT = document.getElementById('bIDCardT'); |
| | | var tradeTime = document.getElementById('tradeTime'); |
| | | var IDCardTime = document.getElementById('IDCardTime'); |
| | | var IDCardTime = document.getElementById('IDCardEnd'); |
| | | var bTime = document.getElementById('bEnd'); |
| | | console.log("进入") |
| | | // 判断是否被选中 |
| | | if (tradeT.checked) { |
| | | tradeTime.disabled = true; |
| | | endTime.disabled = true; |
| | | endTime.value=""; |
| | | } else { |
| | | tradeTime.disabled = false; |
| | | endTime.disabled = false; |
| | | } |
| | | if (IDCardT.checked) { |
| | | IDCardTime.value=""; |
| | | IDCardTime.disabled = true; |
| | | } else { |
| | | IDCardTime.disabled = false; |
| | | } |
| | | if (bIDCardT.checked) { |
| | | bTime.value=""; |
| | | bTime.disabled = true; |
| | | } else { |
| | | bTime.disabled = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | $("#benefit").hide() |
| | | var defaultColunms = TSite.initColumn(); |
| | |
| | | formatter: function (value, row, index) { |
| | | return {1: "上架", 2: "下架"}[value] |
| | | }}, |
| | | {title: '审核状态', field: 'auditStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "待审核", 2: "已通过",3: "已拒绝"}[value] |
| | | }}, |
| | | ]; |
| | | }; |
| | | |
| | |
| | | */ |
| | | TCoupon.openChange = function () { |
| | | if (this.check()){ |
| | | let size = TCoupon.seItem.size |
| | | if(size>0){ |
| | | Feng.info("没有该权限"); |
| | | return; |
| | | } |
| | | let id = TCoupon.seItem.id |
| | | let name = TCoupon.seItem.name |
| | | let quantityIssued = TCoupon.seItem.quantityIssued |
| | |
| | | }; |
| | | TCoupon.onShelf = function (e) { |
| | | if (this.check()) { |
| | | let size = TCoupon.seItem.size |
| | | if(size>0){ |
| | | Feng.info("没有该权限"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/onShelf", function(data){ |
| | | if(data.code==200){ |
| | | Feng.success("操作成功!") |
| | |
| | | } |
| | | |
| | | |
| | | if ($('#userType').val()==1) { |
| | | // 说明 |
| | | var illustrate = $('#illustrate').val(); |
| | | if (illustrate === undefined || illustrate === '' || illustrate === null){ |
| | | return Feng.error('优惠券说明不能为空'); |
| | | } |
| | | } |
| | | // 发放方式 |
| | | let distributionMethod = $(":radio[name='distributionMethod']:checked").val(); |
| | |
| | | if (periodOfValidity === undefined || periodOfValidity === '' || periodOfValidity === null){ |
| | | return Feng.error('有效期不能为空'); |
| | | } |
| | | if ($('#userType').val()==1){ |
| | | // 兑换方式 |
| | | let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val(); |
| | | if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null){ |
| | |
| | | return Feng.error('所需现金不能为空'); |
| | | } |
| | | } |
| | | |
| | | } |
| | | let company = $(':radio[name="company"]:checked').val(); |
| | | var cts = ""; |
| | | if ($('#userType').val()==1) { |
| | | if (company === '2'){ |
| | | var myselect=document.getElementById('cityData'); |
| | | var seCity = myselect.options[myselect.selectedIndex].value; |
| | |
| | | cts = cityIds.join(','); |
| | | } |
| | | } |
| | | |
| | | } |
| | | const commaSeparatedString = this.goodsPicArray.join(','); |
| | | |
| | | var stores = ""; |
| | |
| | | }, function (data) { |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("userType",1); |
| | | ajax.set("cityManagerId",1); |
| | | ajax.set("userType",$('#userType').val()); |
| | | ajax.set("cityManagerId",0); |
| | | ajax.set("couponName",couponName); |
| | | ajax.set("prescription",prescription); |
| | | ajax.set("condition",conditionalAmount); |
| | | ajax.set("subtraction",deductionAmount); |
| | | ajax.set("discount",voucherAmount); |
| | | ajax.set("experience",experienceName); |
| | | var illustrate = $('#illustrate').val(); |
| | | ajax.set("illustrate",illustrate); |
| | | ajax.set("distributionMethod",distributionMethod); |
| | | ajax.set("requiredPoints",requiredPoints); |
| | |
| | | ajax.set("quantityIssued",quantityIssued); |
| | | ajax.set("pickUpQuantity",pickUpQuantity); |
| | | ajax.set("periodOfValidity",periodOfValidity); |
| | | |
| | | if ($('#userType').val()==2) { |
| | | ajax.set("exchangeMethod",1); |
| | | }else{ |
| | | let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val(); |
| | | ajax.set("exchangeMethod",exchangeMethod); |
| | | } |
| | | ajax.set("goodImg",this.goodsCover); |
| | | ajax.set("goodImgs",commaSeparatedString); |
| | | ajax.set("company",company); |
| | |
| | | $('#storeSelect').show(); |
| | | } |
| | | if (userType === '3'){ |
| | | // 兑换方式 |
| | | $('#exchangeType').show(); |
| | | $('#needAmount').show(); |
| | | $('#needIntegral').show(); |
| | | // 图片 |
| | | $('#app').show(); |
| | | $('#app1').show(); |
| | | // 适用范围 |
| | | } |
| | | }); |
| | |
| | | layerIndex: -1, |
| | | deptid:0 |
| | | }; |
| | | var language =$("#language").val() |
| | | var language =1 |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | |
| | | if(row.statusName != '' && row.statusName != null) { |
| | | if(language==1){ |
| | | if (row.statusName == "2"){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="' + `冻结` + '" onfocus="AppUserInfo.tooltip()">' + 冻结 + '</p>'] |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="' + `冻结` + '" onfocus="AppUserInfo.tooltip()">' + `冻结` + '</p>'] |
| | | }else{ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + `启用` + '" onfocus="AppUserInfo.tooltip()">' + 启用 + '</p>'] |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + `启用` + '" onfocus="AppUserInfo.tooltip()">' + `启用` + '</p>'] |
| | | } |
| | | }else if(language==2){ |
| | | if (row.statusName == "2"){ |
| | |
| | | @ApiImplicitParam(value = "位置(1=首页,2=首页底部,3=线上课得积分,4=看视频得奖励,5=常见问题)", name = "position", dataType = "int", required = true), |
| | | }) |
| | | public ResultUtil<List<BannerVo>> queryBannerList(Integer position){ |
| | | try { |
| | | List<Banner> list = bannerService.list(new QueryWrapper<Banner>().eq("position", position).eq("state", 1).orderByAsc("sort")); |
| | | // try { |
| | | // List<Banner> list = bannerService.list(new QueryWrapper<Banner>().eq("position", position).eq("state", 1).orderByAsc("sort")); |
| | | |
| | | // if (position == 4) { |
| | | List<BannerVo> list2 = bannerService.list1(position); |
| | | return ResultUtil.success(list2); |
| | | // } |
| | | |
| | | // List<BannerVo> list1 = new ArrayList<>(); |
| | | // for (Banner banner : list2) { |
| | | // for (Banner banner : list) { |
| | | // BannerVo bannerVo = new BannerVo(); |
| | | // BeanUtils.copyProperties(banner, bannerVo); |
| | | // list1.add(bannerVo); |
| | | // } |
| | | return ResultUtil.success(list2); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | // return ResultUtil.success(list1); |
| | | // }catch (Exception e){ |
| | | // e.printStackTrace(); |
| | | // return ResultUtil.runErr(); |
| | | // } |
| | | } |
| | | |
| | | |