| | |
| | | } |
| | | |
| | | boolean save = couponService.save(coupon); |
| | | // 自动发券 |
| | | if (dataVo.getDistributionMethod() == 3){ |
| | | // 判断用户人群 再判断限领数量 |
| | | switch (dataVo.getUserGroup()){ |
| | | case 1: |
| | | |
| | | break; |
| | | case 2: |
| | | |
| | | break; |
| | | case 3: |
| | | |
| | | break; |
| | | } |
| | | } |
| | | if (save){ |
| | | if (dataVo.getCompany() == 3){ |
| | | String[] split = dataVo.getStoreIds().split(","); |
| | |
| | | <if test="query.state != null"> |
| | | and `state` = #{query.state} |
| | | </if> |
| | | AND endTime >= NOW() |
| | | and `type` = 3 |
| | | order by sort desc |
| | | </select> |
| | |
| | | aa.introduction, |
| | | aa.registerEndTime, |
| | | aa.age, |
| | | (aa.baseNumber+aa.userCompetitionCount) as heat |
| | | (aa.baseNumber+aa.userCompetitionCount) as heat, |
| | | aa.status |
| | | from ( |
| | | SELECT |
| | | a.id, |
| | |
| | | DATE_FORMAT(a.registerEndTime, '%Y-%m-%d %H:%i') AS registerEndTime, |
| | | CONCAT(a.startAge, '-', a.endAge) AS age, |
| | | a.baseNumber, |
| | | COUNT(uc.competitionId) AS userCompetitionCount |
| | | COUNT(uc.competitionId) AS userCompetitionCount, |
| | | CASE |
| | | WHEN NOW() < a.startTime THEN 1 -- 未开始 |
| | | WHEN now() between a.startTime and a.endTime THEN 2 -- 进行中 |
| | | ELSE 3 -- 已结束 |
| | | END AS status |
| | | FROM |
| | | t_competition a |
| | | LEFT JOIN |
| | |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateOperator") |
| | | public ResultUtil updateOperator(Integer id,String name,String userName,String phone,Integer type ,@RequestParam String comArr) { |
| | | public ResultUtil updateOperator(Integer id,String name,String userName |
| | | ,String phone,Integer type ,@RequestParam String comArr) { |
| | | User one = userService.getOne(new QueryWrapper<User>().eq("name", name).eq("phone", phone)); |
| | | if (one!=null){ |
| | | return ResultUtil.error("当前管理员名称和电话已存在!"); |
| | | } |
| | | operatorCityService.remove(new QueryWrapper<TOperatorCity>().eq("operatorId",id)); |
| | | User user = new User(); |
| | | User user = userService.getOne(new QueryWrapper<User>().eq("objectId", id). |
| | | eq("objectType", 2)); |
| | | user.setName(userName); |
| | | user.setAccount(phone); |
| | | user.setPhone(phone); |
| | | user.setObjectType(2); |
| | | String a123456 = SecureUtil.md5("a123456"); |
| | | user.setPassword(a123456); |
| | | userService.save(user); |
| | | userService.updateById(user); |
| | | TOperator data = new TOperator(); |
| | | data.setId(id); |
| | | data.setUserId(user.getId()); |
| | |
| | | @RequestMapping("/addAppUserStudent") |
| | | @ResponseBody |
| | | public Object addAppUser(@RequestBody TStudent student){ |
| | | Double height = student.getHeight(); |
| | | Double weight = student.getWeight(); |
| | | double v = weight / (height * height); |
| | | student.setBmi(v); |
| | | return studentClient.addStudent(student); |
| | | } |
| | | /** |
| | |
| | | @ResponseBody |
| | | public Object getChangeOne(Integer oneId) { |
| | | try { |
| | | return storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId,oneId).eq(TStore::getState,1)); |
| | | return storeService.list(new QueryWrapper<TStore>() |
| | | .eq("operatorId",oneId) |
| | | .eq("state",1)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | |
| | | @ResponseBody |
| | | public ResultUtil confirm(@PathVariable("id") Integer id) { |
| | | |
| | | SiteBooking byId = iSiteBookingService.getById(id); |
| | | String money = byId.getMoney(); |
| | | // todo 这里手动支付 默认按照现金当作支付金额 后续可能要问下产品 |
| | | String[] split = money.split(","); |
| | | BigDecimal bigDecimal = new BigDecimal(split[0]); |
| | | |
| | | |
| | | System.out.println("============"+id); |
| | | SiteBooking siteBooking = new SiteBooking(); |
| | | siteBooking.setId(id); |
| | |
| | | tAppUser.setInsertTime(new Date()); |
| | | tAppUser.setPassword(MD5.md5("111111")); |
| | | appUserClient.addAppUser1(tAppUser); |
| | | siteBooking.setAppUserId(tAppUser.getId()); |
| | | TAppUser appUserByPhone1 = appUserClient.getAppUserByPhone(phone); |
| | | siteBooking.setAppUserId(appUserByPhone1.getId()); |
| | | }else{ |
| | | siteBooking.setAppUserId(appUserByPhone.getId()); |
| | | } |
| | |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | List<TEvaluationListVo> tEvaluationListVos = this.baseMapper.listAll(page, provinceCode, cityCode, name, phone, shopName,operatorId); |
| | | ArrayList<TEvaluationListVo> res = new ArrayList<>(); |
| | | |
| | | List<TEvaluationListVo> tEvaluationListVos = this.baseMapper.listAll(page, provinceCode, cityCode, |
| | | shopName, phone, shopName,operatorId); |
| | | for (TEvaluationListVo tEvaluationListVo : tEvaluationListVos) { |
| | | for (TAppUser tAppUser : list) { |
| | | if(tEvaluationListVo.getAppUserId().equals(tAppUser.getId())){ |
| | | tEvaluationListVo.setName(tAppUser.getName()); |
| | | tEvaluationListVo.setPhone(tAppUser.getPhone()); |
| | | res.add(tEvaluationListVo); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return tEvaluationListVos; |
| | | return res; |
| | | } |
| | | |
| | | @Override |
| | |
| | | <mapper namespace="com.dsh.course.mapper.EvaluationMapper"> |
| | | |
| | | <select id="listAll" resultType="com.dsh.guns.modular.system.model.TEvaluationListVo"> |
| | | select t1.id,t1.appUserId,t1.score,t1.insertTime time,t2.name shopName,t2.province pName,t2.city cName from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id |
| | | select t1.id,t1.appUserId,t1.score,t1.insertTime time, |
| | | t2.name shopName,t2.province pName,t2.city cName |
| | | from t_store_evaluation t1 left join t_store t2 on t1.storeId =t2.id |
| | | where t1.state !=3 |
| | | <if test="provinceCode!=null and provinceCode !=''"> |
| | | and t2.provinceCode =#{provinceCode} |
| | |
| | | |
| | | else { |
| | | if (row.payType === 4){ |
| | | var moneyValues = value.split(','); |
| | | var moneyText = moneyValues[0] + '元/' + moneyValues[1] + '玩湃币'; |
| | | return moneyText; |
| | | return row.payMoney+'元' |
| | | }else if (row.payType === 3){ |
| | | return row.payMoney+'玩湃币' }else { |
| | | return row.payMoney+'元' |
| | |
| | | {title: '限领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '审核状态', field: 'auditStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "上架", 2: "下架"}[value] |
| | | return {1: "待审核", 3: "未通过"}[value] |
| | | }} |
| | | ]; |
| | | }; |
| | |
| | | }; |
| | | TSite.oneChangeYys = function(e){ |
| | | |
| | | var oneId= $("input[name='pt']:checked").val() |
| | | var oneId; |
| | | |
| | | console.log("===========oneId=========="+oneId) |
| | | var SelectValue=""; |
| | | var getSelectValueMenbers = $("input[name='pt']:checked").each(function(j) { |
| | | if (j >= 0) { |
| | | SelectValue += $(this).val() |
| | | } |
| | | }); |
| | | if(SelectValue=='0' ){ |
| | | oneId=0 |
| | | var checkbox = document.querySelector('input[name="pt"]'); |
| | | if (checkbox.checked) { |
| | | oneId=0; |
| | | console.log("选中是平台"); |
| | | } else { |
| | | oneId = $("#yys").val(); |
| | | console.log("运营商"); |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ |
| | | if(data!=null){ |
| | | // var content1 = '<option value="0">平台</option>'; |
| | | if (typeof(oneId) != "undefined") { |
| | | if (oneId == 0) { |
| | | console.log("锁住") |
| | | $("#yys").prop('disabled', true); |
| | | }else{ |
| | | console.log("放开") |
| | | $("#yys").prop('disabled', false); |
| | | } |
| | | |
| | | |
| | | console.log("看看返回数据") |
| | | console.log(data) |
| | | var content='<option value="">选择门店</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | |
| | | |
| | | if (typeof(oneId) == "undefined"){ |
| | | console.log("===============") |
| | | |
| | | oneId = $("#yys").val() |
| | | var button = document.getElementById("yys"); |
| | | button.removeAttribute("disabled"); |
| | | |