| | |
| | | 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; |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | |
| | | public Object list(String name, String phone,Integer type,Integer category,String time) { |
| | | Page<UserIntegral> page = new PageFactory<UserIntegral>().defaultPage(); |
| | | IntegralListQuery integralListQuery = new IntegralListQuery(page.getSize(), page.getCurrent(), name, phone, type, category, time); |
| | | List<UserIntegral> list = client.list(integralListQuery); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | Page<UserIntegral> list = client.list(integralListQuery); |
| | | return super.packForBT(list); |
| | | } |
| | | @RequestMapping("/tIntegral_add") |
| | | public String tCompetitionAdd(Model model) { |
| | | return PREFIX + "TIntegral_add.html"; |
| | | } |
| | | |
| | | |
| | | @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<>(); |
| | | } |
| | | |
| | | |