| | |
| | | */ |
| | | @RequestMapping("/user") |
| | | public String userIndex(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 3)); |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",1).eq("type", 3).eq("language",1)); |
| | | model.addAttribute("one",one); |
| | | TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",2).eq("type", 3).eq("language",1)); |
| | | model.addAttribute("two",two); |
| | | return PREFIX + "tAgreementUser.html"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/showCommonProblem") |
| | | public String showCommonProblem(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 12)); |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",1).eq("type", 12).eq("language",1)); |
| | | model.addAttribute("one",one); |
| | | TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType",2).eq("type", 12).eq("language",1)); |
| | | model.addAttribute("two",two); |
| | | return PREFIX + "commonProblem.html"; |
| | | } |
| | | |
| | |
| | | return PREFIX + "tAgreementSmallPieceLogistics.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到新司机培训设置 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showNewDriverTraining") |
| | | public String showNewDriverTraining(Model model){ |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 16)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "newDriverTraining.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改协议 |
| | | */ |
| | | @RequestMapping(value = "/updateAppParam") |
| | | @ResponseBody |
| | | public Object updateAppParam(@RequestParam Integer id,@RequestParam String context) { |
| | | public Object updateAppParam(@RequestParam Integer id,@RequestParam String context, Integer id1, String context1) { |
| | | TAgreement agreement = tAgreementService.selectById(id); |
| | | agreement.setContent(context); |
| | | agreement.setUpdateTime(new Date()); |
| | | agreement.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tAgreementService.updateById(agreement); |
| | | if (agreement!=null){ |
| | | agreement.setContent(context); |
| | | agreement.setUpdateTime(new Date()); |
| | | agreement.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tAgreementService.updateById(agreement); |
| | | } |
| | | |
| | | |
| | | TAgreement agreement1 = tAgreementService.selectById(id1); |
| | | if (agreement1!=null){ |
| | | agreement1.setContent(context1); |
| | | agreement1.setUpdateTime(new Date()); |
| | | agreement1.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tAgreementService.updateById(agreement1); |
| | | } |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | public Object detail(@PathVariable("tAgreementId") Integer tAgreementId) { |
| | | return tAgreementService.selectById(tAgreementId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取协议 |
| | | * @param language |
| | | * @param type |
| | | * @param useType |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getAgreement") |
| | | @ResponseBody |
| | | public TAgreement getAgreement(Integer language, Integer type, Integer useType){ |
| | | TAgreement tAgreement = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", type) |
| | | .eq("useType", useType).eq("language", language)); |
| | | return tAgreement; |
| | | } |
| | | } |