|
@@ -6,11 +6,14 @@ import com.ytpm.agent.model.YtApp;
|
|
|
import com.ytpm.agent.model.YtDitch;
|
|
import com.ytpm.agent.model.YtDitch;
|
|
|
import com.ytpm.agent.param.DitchListParam;
|
|
import com.ytpm.agent.param.DitchListParam;
|
|
|
import com.ytpm.agent.view.AgentDitchView;
|
|
import com.ytpm.agent.view.AgentDitchView;
|
|
|
|
|
+import com.ytpm.app.model.YtAppDefaultConfig;
|
|
|
|
|
+import com.ytpm.app.view.WxDefaultConfig;
|
|
|
import com.ytpm.dao.AgentDitchMapper;
|
|
import com.ytpm.dao.AgentDitchMapper;
|
|
|
import com.ytpm.dao.AppMapper;
|
|
import com.ytpm.dao.AppMapper;
|
|
|
import com.ytpm.general.RepMessage;
|
|
import com.ytpm.general.RepMessage;
|
|
|
import com.ytpm.general.Result;
|
|
import com.ytpm.general.Result;
|
|
|
import com.ytpm.general.ResultTable;
|
|
import com.ytpm.general.ResultTable;
|
|
|
|
|
+import com.ytpm.lemonios.feign.LemonIosFeign;
|
|
|
import com.ytpm.service.AgentDitchService;
|
|
import com.ytpm.service.AgentDitchService;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -28,6 +31,9 @@ public class AgentDitchServiceImpl implements AgentDitchService {
|
|
|
@Resource
|
|
@Resource
|
|
|
private AppMapper appMapper;
|
|
private AppMapper appMapper;
|
|
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private LemonIosFeign lemonIosFeign;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public ResultTable<AgentDitchView> ditchList(DitchListParam param) {
|
|
public ResultTable<AgentDitchView> ditchList(DitchListParam param) {
|
|
@@ -69,4 +75,29 @@ public class AgentDitchServiceImpl implements AgentDitchService {
|
|
|
agentDitchMapper.update(ytDitch);
|
|
agentDitchMapper.update(ytDitch);
|
|
|
return Result.resultOk(RepMessage.DELETE_SUCCESS);
|
|
return Result.resultOk(RepMessage.DELETE_SUCCESS);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ public Result<?> addDefaultConfig(YtDitch param) {
|
|
|
|
|
+ param.setIsDelete(0);
|
|
|
|
|
+ agentDitchMapper.insertOne(param);
|
|
|
|
|
+
|
|
|
|
|
+ WxDefaultConfig lastOne = lemonIosFeign.getLastOne();
|
|
|
|
|
+ YtAppDefaultConfig appDefaultConfig = new YtAppDefaultConfig();
|
|
|
|
|
+ appDefaultConfig.setConfigName(param.getDitchName());
|
|
|
|
|
+ appDefaultConfig.setDitchId(param.getDitchId().toString());
|
|
|
|
|
+ appDefaultConfig.setOpenId("");
|
|
|
|
|
+ appDefaultConfig.setSecret(lastOne.getSecret());
|
|
|
|
|
+ appDefaultConfig.setAppKey("");
|
|
|
|
|
+ appDefaultConfig.setAppType(lastOne.getAppType());
|
|
|
|
|
+ appDefaultConfig.setAppId(lastOne.getAppId());
|
|
|
|
|
+ appDefaultConfig.setCanUseRoot(lastOne.getCanUseRoot());
|
|
|
|
|
+ appDefaultConfig.setCanUseAdb(lastOne.getCanUseAdb());
|
|
|
|
|
+ appDefaultConfig.setCanAccumulation(lastOne.getCanAccumulation());
|
|
|
|
|
+ appDefaultConfig.setCanSimulator(lastOne.getCanSimulator());
|
|
|
|
|
+ appDefaultConfig.setPowerWaitTime(lastOne.getPowerWaitTime());
|
|
|
|
|
+ appDefaultConfig.setInterstitialIntervalTime(lastOne.getInterstitialIntervalTime());
|
|
|
|
|
+ lemonIosFeign.saveAppConfig(appDefaultConfig);
|
|
|
|
|
+ return Result.resultOk(RepMessage.SAVE_SUCCESS);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|