| | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.CityClient; |
| | | import com.dsh.course.feignClient.account.IntegralClient; |
| | | import com.dsh.course.feignClient.account.model.*; |
| | |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITNoticeService; |
| | | import com.dsh.guns.modular.system.service.StoreConfigService; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | |
| | | @Autowired |
| | | private IntegralClient client; |
| | | @Autowired |
| | | private AppUserClient appUserClient; |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | |
| | | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object list(String name,String text,Integer sort) { |
| | | try { |
| | | TNotice tNotice = new TNotice(); |
| | | tNotice.setContent(text); |
| | | tNotice.setInsertTime(new Date()); |
| | | tNotice.setContent(text); |
| | | tNotice.setName(name); |
| | | tNotice.setSort(sort); |
| | | tNotice.setState(1); |
| | | return new SuccessTip<>(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | public Object list(String phone,Integer integral,String remark) { |
| | | SaveUserIntegralChangesVo vo = new SaveUserIntegralChangesVo(); |
| | | TAppUser appUserByPhone = appUserClient.getAppUserByPhone(phone); |
| | | if (appUserByPhone == null){ |
| | | // 这个手机号 不是用户 |
| | | return 5001; |
| | | }else{ |
| | | vo.setAppUserId(appUserByPhone.getId()); |
| | | vo.setIntegral(integral); |
| | | vo.setRemark(remark); |
| | | vo.setType(1); |
| | | client.saveUserIntegralChanges(vo); |
| | | } |
| | | |
| | | return new SuccessTip<>(); |
| | | } |
| | | |
| | | |