12345678910111213141516171819202122232425262728293031323334 |
- package com.chinacreator.videoalliance.order.process;
- import java.io.UnsupportedEncodingException;
- import java.util.HashMap;
- import java.util.Map;
- import org.springframework.stereotype.Component;
- import com.chinacreator.common.exception.BusinessException;
- import com.chinacreator.common.util.AESUtil;
- import com.chinacreator.videoalliance.order.bean.ExperienceOrderLog;
- import com.chinacreator.videoalliance.order.bean.ExperienceProductBean;
- import com.google.gson.Gson;
- import com.google.gson.GsonBuilder;
- import com.google.gson.reflect.TypeToken;
- @Component
- public abstract class AbstractExperienceOrder {
- protected Map<String,String> decodeMapAES(String content,String key) throws UnsupportedEncodingException, BusinessException{
- String result = AESUtil.decrypt(content, key);
- Gson gson = new GsonBuilder().disableHtmlEscaping().serializeNulls().create();
- HashMap<String, String> map = gson.fromJson(result, new TypeToken<HashMap<String, String>>(){}.getType());
- return map;
- }
-
- public String encodeAES(String content,String key) throws UnsupportedEncodingException, BusinessException{
- return AESUtil.encrypt(content, key);
- }
-
- public abstract Map<String, String> order(ExperienceProductBean experienceProductBean, String userid,
- String orderNum, String effecttime, ExperienceOrderLog logbean) throws Exception;
- //tlj add ( String effecttime,)
- }
|