| | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TEmail; |
| | | import com.stylefeng.guns.modular.system.model.TOrderCharter; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.EmailUtil; |
| | | import org.jsoup.Jsoup; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TIntegralOrder; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | |
| | | @Resource |
| | | private ITSystemNoticeService systemNoticeService; |
| | | |
| | | @Resource |
| | | private ITIntegralGoodsService integralGoodsService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | @RequestMapping("/lookDetail/{id}") |
| | | public String lookDetail(@PathVariable Integer id, Model model) { |
| | | TIntegralOrder tIntegralOrder = tIntegralOrderService.selectById(id); |
| | | model.addAttribute("str",tIntegralOrder.getRemark()); |
| | | model.addAttribute("str",tIntegralOrder.getManageRemark()); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | |
| | | tIntegralOrderService.updateById(tIntegralOrder); |
| | | TIntegralOrder tIntegralOrder1 = tIntegralOrderService.selectById(tIntegralOrder.getId()); |
| | | TUser tUser = userService.selectById(tIntegralOrder1.getUserId()); |
| | | TIntegralGoods tIntegralGoods = integralGoodsService.selectById(tIntegralOrder1.getGoodsId()); |
| | | try { |
| | | Integer language = tUser.getLanguage(); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的积分兑换请求已通过审核,平台客服将会联系您,请耐心等待!" : |
| | | language == 2 ? "Your points redemption request has been approved, and I-GO customer service will contact you. Please be patient!" : |
| | | "Votre demande d’échange de points a été approuvée et le service client d’I-GO vous contactera. Soyez patient !", tIntegralOrder.getUserId()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您使用" + tIntegralOrder1.getIntegral() + "积分成功兑换" + tIntegralGoods.getName() : |
| | | language == 2 ? "You redeemed " + tIntegralOrder1.getIntegral() + " points for the " + tIntegralGoods.getName() + " successfully" : |
| | | "Vous avez échangé " + tIntegralOrder1.getIntegral() + " points avec succès contre le " + tIntegralGoods.getName() + "", tIntegralOrder1.getUserId()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | EmailUtil.send(email, language == 1 ? "积分兑换已通过审核" : language == 2 ? "Points redemption approved" : "Approbation de l’échange de points", document.html()); |
| | | |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | | File file = new File("/home/igotechgh/nginx/html/files/html/"); |
| | | if(!file.exists()){ |
| | | file.mkdirs(); |
| | | } |
| | | String randomString = ToolUtil.getRandomString(10); |
| | | file = new File("/usr/local/nginx/html/files/html/complaint_" + randomString + ".html"); |
| | | file = new File("/home/igotechgh/nginx/html/files/html/complaint_" + randomString + ".html"); |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | |
| | | fileWriter.flush(); |
| | | fileWriter.close(); |
| | | |
| | | String link ="http://182.160.16.251:81/files/html/complaint_" + randomString + ".html"; |
| | | String link ="https://igo.i-go.group/files/html/complaint_" + randomString + ".html"; |
| | | TEmail tEmail = new TEmail(); |
| | | tEmail.setLink(link); |
| | | tEmail.setUserId(tUser.getId()); |